0

I want to make a plot in matplotlib that is wide and short. I can manipulate the size of a plot as answered on this question.

However, the x-axis label disappears if the plot is not tall enough. I want to squeeze the plot more while keeping the axis label visible.

Is there a way to manipulate the size of the plot without getting rid of the axis label?

1 Answer 1

2

After you change the plot size, run tight_layout(). Note that this requires matplotlib v1.1 or newer. If you have an older version of matplotlib, you can run subplot_tool() or subplots_adjust to adjust the plot manually.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.