0

I can easily create subplots in matplotlib using something like:

import matplotlib.pyplot as plt
fig, (ax1, ax2) = plt.subplots(nrows=1, ncols=2)

However, what I would like to do is something where I have two plots in the first row and one plot (which takes the width of the two plots above) in the second row. Is it somehow possible to do that with matplotlib?

1 Answer 1

2

Take a look at this page: http://matplotlib.org/users/gridspec.html

It looks like the syntax you are after is

plt.subplot2grid((3,3), (1, 0), colspan=2)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.