Subplot with 5 graphs

Viewed 17

I have the following snippet:

fig = plt.figure()

plt.subplot(2, 2, 1)
plt.plot(x, y)

plt.subplot(2, 2, 2)
plt.plot(x, y)

plt.subplot(2, 2, 3)
plt.plot(x, y)

plt.subplot(2, 2, 4)
plt.plot(x, y)

plt.show()

which is a 2x2 matrix with 4 graphs in total.

I would like to add a fifth graph in a new third row, in the center. Is there any way to do this while maintaining this code structure?

0 Answers
Related