Skip to main content
2 of 6
added 1 character in body; edited body; added 76 characters in body; added 17 characters in body
River
  • 9.2k
  • 15
  • 57
  • 69

You can simply use:

set_size_inches(width,height)

As of Matplotlib 2.0.0 it will even automatically update your canvas as the forward keyword now defaults to True. (For earlier versions you need to specify forward=True explicitly.)

If you want to just change the width or height instead of both, you can use

set_figwidth

or

set_figheight

Unfortunately you need to specify forward=True to automatically propagate the changes as it still defaults to False for these functions. (And these functions don’t even support forward in versions older than Matplotlib 1.5.0)

River
  • 9.2k
  • 15
  • 57
  • 69