DJE*_*bow 7 python matplotlib ipython
使用matplotlib和iPython,我有一堆我想要查看的图(一个接一个).某些图仅包含0到1的值,有些包含数百万的值.
使用以下方法设置y轴限制后:
ylim((.7,1))
Run Code Online (Sandbox Code Playgroud)
我希望能够重置此设置以自动设置限制(就像之前所做的那样).我找不到正确的方法.
tac*_*ell 13
ax = plt.gca() # get the current axes
ax.relim() # make sure all the data fits
ax.autoscale() # auto-scale
# only needed mpl < 1.5
# ax.figure.canvas.draw_idle() # re-draw the figure
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4924 次 |
| 最近记录: |