This post introduces how to check the default figure size in Matplotlib, and how to change the figure size.
The default value is [8.0, 6.0] which can be changed of course.
To know all the default values just inspect the value of ‘rcParams’
print(plt.rcParams) # it will tell you all default setting in Matplotlib print(plt.rcParams.get('figure.figsize'))
To change the figure size.
you can use the following:
plt.figure(figsize=(20,10)) fig, ax = plt.subplots(figsize=(20, 10))