fig, ax = plt.subplots(3, 3, sharex='col', squeeze=False, figsize=(20, 10))
I want to plot 7 subplots and am using the command above. However it creates 9 plots (including 2 empty ones). How can I make sure that only 7 plots get drawn?
import matplotlib.pyplot as plt
fig, axs = plt.subplots(3,3)
fig.delaxes(axs[-1, -1])
fig.delaxes(axs[-1, -2])
plt.show()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With