/ Back Buttons Zoom Button Save the Figure Button Pan Axis Button Configure Subplots Button Figure . Home Button → The Home Button will help once you have begun navigating your chart. If you ever want to return back to the original view, you can click on this. Forward/Back buttons → These buttons can be used like the Forward and Back buttons in your browser.
You can click these to move back to the previous point you were at, or forward again. Pan Axis → This cross-looking button allows you to click it, and then click and drag your graph around. Zoom → The Zoom button lets you click on it, then click and drag a square that you would like to zoom into specifically. Zooming in will require a left click and drag.
You can alternatively zoom out with a right click and drag. Configure Subplots → This button allows you to configure various spacing options with your figure and plot. Save Figure → This button will allow you to save your figure in various forms. Special Plot Types .
Matplotlib allows you to create different kinds of plots ranging from histograms and scatter plots to bar graphs and bar charts. Line Chart A Line Chart or Line Graph is a type of chart which displays information as a series of data points called ‘markers’ connected by straight line segments. A Line Chart is often used to visualize a trend in data over intervals of time – a time series – thus the line is often drawn chronologically. 12th Computer Chapter - - Data Visualization using Pyplot Example: Line plot import matplotlib.pyplot as plt years = [ , , , , ] = [8939007, 8954518, 8960387, 8956741, 8943721] plt.plot (years, ) plt.title ("Year vs Population in India") plt.xlabel ("Year") plt.ylabel ("Total Population") plt.show() In this program, Plt.title() → specifies title to the graph Plt.xlabel() → specifies label for X-axis Plt.ylabel() → specifies label for Y-axis Output Year vs Population in India 8960000 8950000 894500 8940000 .