1

I want to set a 'minimum' axis limit - in other words, I want to set_ylim([0, 30]), but adding point at y = 40 would have the axis grow to accommodate it. Is there any combination of limits and autoscaling that could achieve this for me?

4

1 回答 1

2
set_ylim(ymin=0)

文档。

有趣的是,API 最近更改为 bottomand top

set_ylim(bottom=0)

虽然ymin并且ymax仍然是合法的。

于 2012-06-12T05:02:30.900 回答