简体   繁体   English

Sympy-更改图的y轴范围

[英]Sympy - altering the range of the y axis for a plot

Using Sympy how does one set the range for the y axis ? 使用Sympy如何设置y轴的范围?

plot((x**2 + 2))

I wanted to have this so that the y axis would be from 0 to 7 我想要这样,以便y轴从0到7

When you plot you can use the kwargs xlim and ylim to set the axis limits. 绘制时,可以使用kwargs xlimylim设置轴限制。

For example: 例如:

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

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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