I need to add two subplots to a figure. One subplot needs to be about three times as wide as the second (same height). I accomplished this using GridSpec
and the colspan
argument but I would like to do this using figure
so I can save to PDF. I can adjust the first figure using the figsize
argument in the constructor, but how do I change the size of the second plot?
Python – Matplotlib different size subplots
figurematplotlibplotpython
Related Topic
- Python – In Matplotlib, what does the argument mean in fig.add_subplot(111)
- Python – How to change the font size on a matplotlib plot
- Python – Importing files from different folder
- Python – Improve subplot size/spacing with many subplots in matplotlib
- Python – Save plot to image file instead of displaying it using Matplotlib
- Python – How to set the figure title and axes labels font size in Matplotlib
- Python – Matplotlib – adding subplots to a subplot
Best Answer
subplots
function and pass the width ratio withgridspec_kw
matplotlib.gridspec.GridSpec
has availablegridspect_kw
options