sympy plot function examples

Running environment is IPython Notebook in Debian Wheezy.

from sympy import symbols
from sympy.plotting import plot
x = symbols('x')

# Default value range of y axis is so big, it's hard to see the graph's shape
plot(1/(x - 2), (x, 0, 4))

# It limits the value range of y axis of the graph.
plot(1/(x - 2), (x, 0, 4), ylim=(-10, 10))

x-2over1a

x-2over1b

About janpenguin

Email: janpenguin [at] riseup [dot] net Every content on the blog is made by Free and Open Source Software in GNU/Linux.
This entry was posted in Python and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s