简体   繁体   中英

Sympy - altering the range of the y axis for a plot

Using Sympy how does one set the range for the y axis ?

plot((x**2 + 2))

I wanted to have this so that the y axis would be from 0 to 7

When you plot you can use the kwargs xlim and ylim to set the axis limits.

For example:

>>> plot((x**2 + 2), xlim=[-3,3], ylim=[0,7])

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM