Matplotlib – Pyplot API

A Pyplot is the module of the Matplotlib library. The matplotlib.pyplot is a state-based interface to Matplotlib. Pyplot is mainly designed to generate an interactive plot. This module provides lots of function such as different plotting function, plot decorative functions, Image function, Axis function, etc.

 

Types of Plot

Function Description
Bar Make a Bar Plot
Barh Make a horizontal Bar Plot
Box Plot Make a Box plot
Hist Plot a histogram
hist2d Make a 2D histogram plot
Pie Plot a Pie chart
Plot Make a line chart
Polar Make a polar plot
Scatter Make a scatter plot of x & y
Stackplot Draws a stacked area plot.
Stem Draws a stem plot
Step Create a step plot

 

Image Functions

Function Description
Imread Read an Image 
Imsave Save an Image
Imshow Display an Image

 

Axis Functions

Function Description
Axes Add axes to the figure.
Text Add text to the axes
Title Set title to the current axes
xlabel Set the x axis label of the current axis.
ylabel Set the y axis label of the current axis.
xlim Get or set the x limits of the current axes.
ylim Get or set the y-limits of the current axes.
xticks Get or set the current tick locations and labels of the x-axis.
yticks Get or set the y-limits of the current tick locations and labels.

 

Figure Functions

Function Description
Figtext Add text to figure.
Figure Creates a new figure.
Show Display a figure.
Savefig Save the current figure.
Close Close a figure window.

Leave a Reply

Your email address will not be published. Required fields are marked *

Matplotlib Tutorials

Matplotlib – Graph Decoration

Matplotlib – subplot2grid

Matplolib – Twin Axes

Matplotlib – Axes Class

Matplotlib – Violin plot

Matplotlib – Box Plot

Matplotlib – Histogram

Matplotlib – Pie Chart

Matplotlib – Bar Plot

Matplotlib – Scatter plot

Matplotlib – Figure

Matplotlib – Subplot

Matplotlib – Plot

Matplotlib Introduction