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

孤人 提交于 2020-06-12 05:11:39

问题


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


回答1:


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])



来源:https://stackoverflow.com/questions/33881624/sympy-altering-the-range-of-the-y-axis-for-a-plot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!