網頁

2011年8月9日星期二

matplotlib

matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms.


plotting commands


FunctionDescription
acorrplot the autocorrelation function
annotateannotate something in the figure
arrowadd an arrow to the axes
axescreate a new axes
axhlinedraw a horizontal line across axes
axvlinedraw a vertical line across axes
axhspandraw a horizontal bar across axes
axvspandraw a vertical bar across axes
axisset or return the current axis limits
barbsa (wind) barb plot
barmake a bar chart
barha horizontal bar chart
broken_barha set of horizontal bars with gaps
boxset the axes frame on/off state
boxplotmake a box and whisker plot
claclear current axes
clabellabel a contour plot
clfclear a figure window
climadjust the color limits of the current image
closeclose a figure window
colorbaradd a colorbar to the current figure
coheremake a plot of coherence
contourmake a contour plot
contourfmake a filled contour plot
csdmake a plot of cross spectral density
delaxesdelete an axes from the current figure
drawForce a redraw of the current figure
errorbarmake an errorbar graph
figlegendmake legend on the figure rather than the axes
figimagemake a figure image
figtextadd text in figure coords
figurecreate or change active figure
fillmake filled polygons
fill_betweenmake filled polygons between two curves
findobjrecursively find all objects matching some criteria
gcareturn the current axes
gcfreturn the current figure
gciget the current image, or None
getpget a graphics property
gridset whether gridding is on
hexbinmake a 2D hexagonal binning plot
histmake a histogram
holdset the axes hold state
ioffturn interaction mode off
ionturn interaction mode on
isinteractivereturn True if interaction mode is on
imreadload image file into array
imsavesave array as an image file
imshowplot image data
isholdreturn the hold state of the current axes
legendmake an axes legend
locator_paramsadjust parameters used in locating axis ticks
logloga log log plot
matshowdisplay a matrix in a new figure preserving aspect
marginsset margins used in autoscaling
pcolormake a pseudocolor plot
pcolormeshmake a pseudocolor plot using a quadrilateral mesh
piemake a pie chart
plotmake a line plot
plot_dateplot dates
plotfileplot column data from an ASCII tab/space/comma delimited file
piepie charts
polarmake a polar plot on a PolarAxes
psdmake a plot of power spectral density
quivermake a direction field (arrows) plot
rccontrol the default params
rgridscustomize the radial grids and labels for polar
savefigsave the current figure
scattermake a scatter plot
setpset a graphics property
semilogxlog x axis
semilogylog y axis
showshow the figures
specgrama spectrogram plot
spyplot sparsity pattern using markers or image
stemmake a stem plot
subplotmake a subplot (numrows, numcols, axesnum)
subplots_adjustchange the params controlling the subplot positions of current figure
subplot_toollaunch the subplot configuration tool
suptitleadd a figure title
tableadd a table to the plot
textadd some text at location x,y to the current axes
thetagridscustomize the radial theta grids and labels for polar
tick_paramscontrol the appearance of ticks and tick labels
ticklabel_formatcontrol the format of tick labels
titleadd a title to the current axes
tricontourmake a contour plot on a triangular grid
tricontourfmake a filled contour plot on a triangular grid
tripcolormake a pseudocolor plot on a triangular grid
triplotplot a triangular grid
xcorrplot the autocorrelation function of x and y
xlimset/get the xlimits
ylimset/get the ylimits
xticksset/get the xticks
yticksset/get the yticks
xlabeladd an xlabel to the current axes
ylabeladd a ylabel to the current axes
autumnset the default colormap to autumn
boneset the default colormap to bone
coolset the default colormap to cool
copperset the default colormap to copper
flagset the default colormap to flag
grayset the default colormap to gray
hotset the default colormap to hot
hsvset the default colormap to hsv
jetset the default colormap to jet
pinkset the default colormap to pink
prismset the default colormap to prism
springset the default colormap to spring
summerset the default colormap to summer
winterset the default colormap to winter
spectralset the default colormap to spectral





pyplot
 provides a Matlab-like plotting framework.





import numpy as np
import matplotlib.pyplot as plt

x = np.arange(0, 5, 0.1);
y = np.sin(x)
plt.plot(x, y)



 From: http://matplotlib.sourceforge.net/index.html

沒有留言:

發佈留言