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?

2
  • Can you post a simple self contained sample that exhibits the incorrect behavior? Commented Jun 12, 2012 at 0:33
  • this is what matplotlib does for me by default... (Python 2.6.5, matplotlib 0.99.1.1, Ubuntu Linux) Commented Jun 12, 2012 at 3:07

1 Answer 1

2
set_ylim(ymin=0)

Documentation.

Interesting, the API recently changed to bottom and top:

set_ylim(bottom=0)

although ymin and ymax are still legal.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.