How do you change the size of figures drawn with matplotlib?


Question

How do you change the size of figure drawn with matplotlib?

1
1604
12/1/2008 9:24:44 PM

figure tells you the call signature:

from matplotlib.pyplot import figure
figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')

figure(figsize=(1,1)) would create an inch-by-inch image, which would be 80-by-80 pixels unless you also give a different dpi argument.

909
7/18/2018 6:34:47 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon