matplotlib tries to make easy things easy and hard things possible.
You can generate plots, histograms, power spectra, bar charts,
errorcharts, scatterplots, etc, with just a few lines of code. For
example, to make a histogram of data in x, you simply need to type
Plotting commands
Function | Description |
acorr
|
plot the autocorrelation function
|
annotate
|
annotate something in the figure
|
arrow
|
add an arrow to the axes
|
axes
|
Create a new axes
|
axhline
|
draw a horizontal line across axes
|
axvline
|
draw a vertical line across axes
|
axhspan
|
draw a horizontal bar across axes
|
axvspan
|
draw a vertical bar across axes
|
axis
|
Set or return the current axis limits
|
bar
|
make a bar chart
|
barh
|
a horizontal bar chart
|
broken_barh
|
a set of horizontal bars with gaps
|
box
|
set the axes frame on/off state
|
boxplot
|
make a box and whisker plot
|
cla
|
clear current axes
|
clabel
|
label a contour plot
|
clf
|
clear a figure window
|
clim
|
adjust the color limits of the current image
|
close
|
close a figure window
|
colorbar
|
add a colorbar to the current figure
|
cohere
|
make a plot of coherence
|
contour
|
make a contour plot
|
contourf
|
make a filled contour plot
|
csd
|
make a plot of cross spectral density
|
delaxes
|
delete an axes from the current figure
|
draw
|
Force a redraw of the current figure
|
errorbar
|
make an errorbar graph
|
figlegend
|
make legend on the figure rather than the axes
|
figimage
|
make a figure image
|
figtext
|
add text in figure coords
|
figure
|
create or change active figure
|
fill
|
make filled polygons
|
findobj
|
recursively find all objects matching some criteria
|
gca
|
return the current axes
|
gcf
|
return the current figure
|
gci
|
get the current image, or None
|
getp
|
get a handle graphics property
|
grid
|
set whether gridding is on
|
hist
|
make a histogram
|
hold
|
set the axes hold state
|
ioff
|
turn interaction mode off
|
ion
|
turn interaction mode on
|
isinteractive
|
return True if interaction mode is on
|
imread
|
load image file into array
|
imshow
|
plot image data
|
ishold
|
return the hold state of the current axes
|
legend
|
make an axes legend
|
loglog
|
a log log plot
|
matshow
|
display a matrix in a new figure preserving aspect
|
pcolor
|
make a pseudocolor plot
|
pcolormesh
|
make a pseudocolor plot using a quadrilateral mesh
|
pie
|
make a pie chart
|
plot
|
make a line plot
|
plot_date
|
plot dates
|
plotfile
|
plot column data from an ASCII tab/space/comma delimited file
|
pie
|
pie charts
|
polar
|
make a polar plot on a PolarAxes
|
psd
|
make a plot of power spectral density
|
quiver
|
make a direction field (arrows) plot
|
rc
|
control the default params
|
rgrids
|
customize the radial grids and labels for polar
|
savefig
|
save the current figure
|
scatter
|
make a scatter plot
|
setp
|
set a handle graphics property
|
semilogx
|
log x axis
|
semilogy
|
log y axis
|
show
|
show the figures
|
specgram
|
a spectrogram plot
|
spy
|
plot sparsity pattern using markers or image
|
stem
|
make a stem plot
|
subplot
|
make a subplot (numrows, numcols, axesnum)
|
subplots_adjust
|
change the params controlling the subplot positions of current figure
|
subplot_tool
|
launch the subplot configuration tool
|
suptitle
|
add a figure title
|
table
|
add a table to the plot
|
text
|
add some text at location x,y to the current axes
|
thetagrids
|
customize the radial theta grids and labels for polar
|
title
|
add a title to the current axes
|
xcorr
|
plot the autocorrelation function of x and y
|
xlim
|
set/get the xlimits
|
ylim
|
set/get the ylimits
|
xticks
|
set/get the xticks
|
yticks
|
set/get the yticks
|
xlabel
|
add an xlabel to the current axes
|
ylabel
|
add a ylabel to the current axes
|
autumn
|
set the default colormap to autumn
|
bone
|
set the default colormap to bone
|
cool
|
set the default colormap to cool
|
copper
|
set the default colormap to copper
|
flag
|
set the default colormap to flag
|
gray
|
set the default colormap to gray
|
hot
|
set the default colormap to hot
|
hsv
|
set the default colormap to hsv
|
jet
|
set the default colormap to jet
|
pink
|
set the default colormap to pink
|
prism
|
set the default colormap to prism
|
spring
|
set the default colormap to spring
|
summer
|
set the default colormap to summer
|
winter
|
set the default colormap to winter
|
spectral
|
set the default colormap to spectral
|