- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to make more than 10 subplots in a figure using Matplotlib?
To make more than 10 subplots in a figure, we can use subplots() method with some rows and columns.
Steps
- Set the figure size and adjust the padding between and around the subplots.
- Initialize rows count and columns count.
- Create a figure and a set of subplots with rows☓cols subplots.
- To display the figure, use show() method.
Example
from matplotlib import pyplot as plt plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True rows = 4 cols = 3 fig, axes = plt.subplots(nrows=rows, ncols=cols) plt.show()
Output
- Related Articles
- Annotate Subplots in a Figure with A, B, C using Matplotlib
- How to combine several matplotlib axes subplots into one figure?
- How to set same scale for subplots in Python using Matplotlib?
- How to zoom subplots together in Matplotlib/Pyplot?
- Animation using Matplotlib with subplots and ArtistAnimation
- Draw a border around subplots in Matplotlib
- How to share secondary Y-axis between subplots in Matplotlib?
- How to have a function return a figure in Python (using Matplotlib)?
- How to make a heatmap square in Seaborn FacetGrid using Matplotlib?
- How to make a quiver plot in polar coordinates using Matplotlib?
- How to increase the spacing between subplots in Matplotlib with subplot2grid?
- How to close a Python figure by keyboard input using Matplotlib?
- How to decrease the density of tick labels in subplots in Matplotlib?
- Embedding small plots inside subplots in Matplotlib
- Manipulation on vertical space in Matplotlib subplots

Advertisements