Sympy-更改图的y轴范围 [英] Sympy - altering the range of the y axis for a plot

查看:53
本文介绍了Sympy-更改图的y轴范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Sympy 如何设置 y 轴的范围?

plot((x**2 + 2)) 

我想要这个,以便 y 轴从 0 到 7

解决方案

绘图时可以使用 kwargs xlimylim 来设置轴限制.

例如:

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

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

这篇关于Sympy-更改图的y轴范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆