Matplotlib Subplot Size

Python

In the below example the total size of our plot will have a width of 15 inches and a height of 7 inches. Within the plot there will be two subplots displayed across one row and two columns.

 1|  #Template
 2|  fig, ax = plt.subplots(rows, columns,figsize=(width, height)) 
 3|  plt.show()
 4|  
 5|  #Example
 6|  fig, ax = plt.subplots(1,2,figsize=(15,7)) 
 7|  plt.show()
Matplotlib Subplot Size
Did you find this snippet useful?

Sign up for free to to add this to your code library