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?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
Probably the simplest way is using
subplot2grid
, described in Customizing Location of Subplot Using GridSpec.is equal to
so bmu's example becomes:
Another way is to use the
subplots
function and pass the width ratio withgridspec_kw
:I used
pyplot
'saxes
object to manually adjust the sizes without usingGridSpec
:You can use
gridspec
andfigure
: