Skip to content
Advertisement

Tag: subplot

Matplotlib – adding subplots to a subplot?

I’m trying to create a figure that consists of a 2×2 grid, where in each quadrant there are 2 vertically stacked subplots (i.e. a 2×1 grid). I can’t seem to figure out how to achieve this, though. The closest I’ve gotten is using gridspec and some ugly code (see below), but because gridspec.update(hspace=X) changes the spacing for all of the

How to create groupby subplots in Pandas?

I’ve got a dataframe with timeseries data of crime with a facet on offence (which looks like the format below). What I’d like to perform a groupby plot on the dataframe so that it’s possible to explore trends in crime over time. I’ve got some code which does the job, but it’s a bit clumsy and it loses the time

Matplotlib different size subplots

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

Advertisement