Learn Python
Learn Data Structure & Algorithm
Learn Numpy
Learn Pandas
Matplotlib Introduction
Matplotlib Bar Plot
Matplotlib Pie Chart
Matplotlib Hist Plot
Matplotlib Line Plot
Matplotlib Scatter Plot
Matplotlib Subplot
Matplotlib Save image
Learn Seaborn
Learn Statistics
Learn Math
Learn MATLAB
Learn Machine learning
Learn Github
Learn OpenCV
Learn Deep Learning
Learn MySQL
Learn MongoDB
Learn Web scraping
Learn Excel
Learn Power BI
Learn Tableau
Learn Docker
Learn Hadoop
When you want to show multiple graphs on one page then you use a subplot. Suppose you have to plot two charts
one line chart and the other is the pie chart. When you try to see a pie chart then you will not be able to
see a line chart.
What subplot will do?
It will set the chart one by one in rows and columns. Here you have to define row
and column number and also the position means in which position of row and column the graph should go.
To create subplot write module_name.subplot(row,column,index) before each and every plot.
Suppose we write plt.subplot(2,2,1). It means maximum number of row is 2 and maximum number of column is 2. So
we can say that here we can plot 4 plots and 1 means first position. Here first position means first row first
column. Now If we write plt.subplot(4,2,3) then we will have 4 rows and 2 columns and 4 means second row first
column. Here we can plot total 8 plots.