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?

Community
  • 1
  • 1
ashim
  • 24,380
  • 29
  • 72
  • 96

1 Answers1

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.

tiago
  • 22,602
  • 12
  • 72
  • 88