Question

I want to make a plot in matplotlib with subplots arranged like so:

Layout

Where each of the colored squares represents a different subplot. How can I get matplotlib to make two subplots, one of which has several sub-subplots?

Was it helpful?

Solution

You can use subplot():

pl.figure(figsize=(12, 6))
pl.subplot(1, 2, 1)
for axeid in (3, 4, 7, 8):
    pl.subplot(2, 4, axeid)

the output is:

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top