matplotlib (version 0.80, $Date: 2005/04/12 14:45:58 $)
index
/usr/lib/python2.3/site-packages/matplotlib/__init__.py

This is a matlab(TM) style functional interface the matplotlib.
 
The following matlab(TM) compatible commands are provided by
 
   >>> from pylab import *
 
Plotting commands
 
  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  
  boxplot  - make a box and whisker plot
  cla      - clear current axes
  clf      - clear a figure window
  close    - close a figure window
  colorbar - add a colorbar to the current figure
  cohere   - make a plot of coherence
  contour  - make a contour plot
  csd      - make a plot of cross spectral density  
  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
  gca      - return the current axes
  gcf      - return the current figure
  gci      - get the current image, or None
  get      - get a handle graphics property
  gray     - set the current colormap to gray
  jet      - set the current colormap to jet
  hist     - make a histogram
  hold     - set the axes hold state
  legend   - make an axes legend
  loglog   - a log log plot
  imread   - load image file into array
  imshow   - plot image data
  pcolor   - make a pseudocolor plot
  plot     - make a line plot
  psd      - make a plot of power spectral density
  rc       - control the default params
  savefig  - save the current figure
  scatter  - make a scatter plot
  set      - set a handle graphics property
  semilogx - log x axis
  semilogy - log y axis
  show     - show the figures
  specgram - a spectrogram plot
  stem     - make a stem plot
  subplot  - make a subplot (numrows, numcols, axesnum)
  table    - add a table to the plot
  text     - add some text at location x,y to the current axes
  title    - add a title to the current axes
  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
 
Matrix commands
 
  cumprod   - the cumulative product along a dimension
  cumsum    - the cumulative sum along a dimension
  detrend   - remove the mean or besdt fit line from an array
  diag      - the k-th diagonal of matrix 
  diff      - the n-th differnce of an array
  eig       - the eigenvalues and eigen vectors of v
  eye       - a matrix where the k-th diagonal is ones, else zero 
  find      - return the indices where a condition is nonzero  
  fliplr    - flip the rows of a matrix up/down
  flipud    - flip the columns of a matrix left/right
  linspace  - a linear spaced vector of N values from min to max inclusive
  ones      - an array of ones
  rand      - an array from the uniform distribution [0,1]
  randn     - an array from the normal distribution
  rot90     - rotate matrix k*90 degress counterclockwise
  squeeze   - squeeze an array removing any dimensions of length 1
  tri       - a triangular matrix
  tril      - a lower triangular matrix
  triu      - an upper triangular matrix
  vander    - the Vandermonde matrix of vector x
  svd       - singular value decomposition
  zeros     - a matrix of zeros
  
Probability
 
  levypdf   - The levy probability density function from the char. func.
  normpdf   - The Gaussian probability density function
  rand      - random numbers from the uniform distribution
  randn     - random numbers from the normal distribution
 
Statistics
 
  corrcoef  - correlation coefficient
  cov       - covariance matrix
  max       - the maximum along dimension m
  mean      - the mean along dimension m
  median    - the median along dimension m
  min       - the minimum along dimension m
  norm      - the norm of vector x
  prod      - the product along dimension m
  ptp       - the max-min along dimension m
  std       - the standard deviation along dimension m
  sum       - the sum along dimension m
 
Time series analysis
 
  bartlett  - M-point Bartlett window
  blackman  - M-point Blackman window
  cohere    - the coherence using average periodiogram
  csd       - the cross spectral density using average periodiogram
  fft       - the fast Fourier transform of vector x
  hamming   - M-point Hamming window
  hanning   - M-point Hanning window
  hist      - compute the histogram of x
  kaiser    - M length Kaiser window
  psd       - the power spectral density using average periodiogram
  sinc      - the sinc function of array x
 
Other
 
  angle     - the angle of a complex array
  polyfit   - fit x, y to an n-th order polynomial
  polyval   - evaluate an n-th order polynomial
  roots     - the roots of the polynomial coefficients in p
  trapz     - trapezoidal integration
 
 
Credits: The plotting commands were provided by
John D. Hunter <jdhunter@ace.bsd.uhicago.edu>
 
Most of the other commands are from the Numeric, MLab and FFT, with
the exception of those in mlab.py provided by matplotlib.

 
Package Contents
       
_agg
_contour
_image
_mathtext_data
_na_backend_gdk
_na_contour
_na_image
_na_transforms
_pylab_helpers
_transforms
afm
agg
artist
axes
axis
backend_bases
backends (package)
cbook
cm
collections
colors
contour
dates
enthought (package)
figure
finance
font_manager
ft2font
image
legend
lines
mathtext
mlab
numerix (package)
patches
pylab
pyparsing
table
text
ticker
transforms
windowing

 
Classes
       
exceptions.Exception
MPLError
Verbose
validate_nseq_float

 
class MPLError(exceptions.Exception)
    Exception for Matplotlib errors
Attributes:
    message -- explanation of the error
 
  Methods defined here:
__init__(self, message)
__str__(self)

Methods inherited from exceptions.Exception:
__getitem__(...)

 
class Verbose
    A class to handle reporting.  Set the fileo attribute to any file
instance to handle the output.  Default is sys.stdout
 
  Methods defined here:
__init__(self, level)
ge(self, level)
return true if self.level is >= level
report(self, s, level='helpful')
print message s to self.fileo if self.level>=level.  Return
value indicates whether a message was issued
set_level(self, level)
set the verbosity to one of the Verbose.levels strings
wrap(self, fmt, func, level='helpful', always=True)
return a callable function that wraps func and reports it
output through the verbose handler if current verbosity level
is higher than level
 
if always is True, the report will occur on every function
call; otherwise only on the first time the function is called

Data and other attributes defined here:
arg = 'wheel.py~c'
i = 3
level = 'debug-annoying'
levels = ('silent', 'helpful', 'debug', 'debug-annoying')
vald = {'debug': 2, 'debug-annoying': 3, 'helpful': 1, 'silent': 0}

 
class validate_nseq_float
     Methods defined here:
__call__(self, s)
return a seq of n floats or raise
__init__(self, n)

 
Functions
       
get_backend()
get_data_path = wrapper(*args, **kwargs)
get the path to matplotlib data
get_home()
return the users HOME dir across platforms or None.
 
On win32, if either HOME is not set or HOME is set but doesn't
exist, the value of USERPROFILE will be used instead.
interactive(b)
Set interactive mode to boolean b.
 
If b is True, then draw after every plotting command, eg, after xlabel
is_interactive()
Return true if plot mode is interactive
matplotlib_fname()
Return the path to the rc file
 
Search order:
 
 * current working dir
 * environ var MATPLOTLIBRC
 * HOME/.matplotlibrc
 * MATPLOTLIBDATA/.matplotlibrc
rc(group, **kwargs)
Set the current rc params.  Group is the grouping for the rc, eg
for lines.linewidth the group is 'lines', for axes.facecolor, the
group is 'axes', and so on.  kwargs is a list of attribute
name/value pairs, eg
 
  rc('lines', linewidth=2, color='r')
 
sets the current rc params and is equivalent to
 
  rcParams['lines.linewidth'] = 2
  rcParams['lines.color'] = 'r'
 
The following aliases are available to save typing for interactive
users
    'lw'  : 'linewidth'
    'ls'  : 'linestyle'        
    'c'   : 'color'
    'fc'  : 'facecolor'
    'ec'  : 'edgecolor'
    'mfc' : 'markerfacecolor'
    'mec' : 'markeredgecolor'
    'mew' : 'markeredgewidth'
    'aa'  : 'antialiased'            
    'l'   : 'lines'
    'a'   : 'axes'
    'f'   : 'figure'
    'p'   : 'patches'
    'g'   : 'grid'
 
Thus you could abbreviate the above rc command as
 
      rc('l', lw=2, c='r')
 
 
Note you can use python's kwargs dictionary facility to store
dictionaries of default parameters.  Eg, you can customize the
font rc as follows
 
  font = {'family' : 'monospace',
          'weight' : 'bold',
          'size'   : 'larger',
         }
 
  rc('font', **font)  # pass in the font dict as kwargs
 
This enables you to easily switch between several configurations.
Use rcdefaults to restore the default rc params after changes.
rc_params()
Return the default params updated from the values in the rc file
rcdefaults()
Restore the default rc params - the ones that were created at
matplotlib load time
tk_window_focus()
Return true if focus maintenance under TkAgg on win32 is on.
This currently works only for python.exe and IPython.exe.
Both IDLE and Pythonwin.exe fail badly when tk_window_focus is on.
use(arg)
Set the matplotlib backend to one of the _knownBackends
validate_bool(b)
Convert b to a boolean or raise
validate_color(s)
return a valid color arg
validate_comma_sep_str(s)
return a list
validate_float(s)
convert s to float or raise
validate_fontsize(s)
validate_int(s)
convert s to float or raise
validate_numerix(s)
return "Numeric" or "Numarray" or raise
validate_orientation(s)
validate_path_exists(s)
If s is a path, return s, else False
validate_toolbar(s)
return toolbar string 'None', 'classic', 'toolbar2'
validate_verbose(s)
validate_verbose_fileo(s)

 
Data
        FROZEN = False
__date__ = '$Date: 2005/04/12 14:45:58 $'
__revision__ = '$Revision: 1.49 $'
__version__ = '0.80'
defaultParams = {'axes.edgecolor': ['black', <function validate_color>], 'axes.facecolor': ['white', <function validate_color>], 'axes.grid': [False, <function validate_bool>], 'axes.hold': [True, <function validate_bool>], 'axes.labelcolor': ['black', <function validate_color>], 'axes.labelsize': [12.0, <function validate_fontsize>], 'axes.linewidth': [1.0, <function validate_float>], 'axes.titlesize': [14.0, <function validate_fontsize>], 'backend': ['GTKAgg', <type 'str'>], 'datapath': ['/usr/share/matplotlib', <function validate_path_exists>], ...}
generators = _Feature((2, 2, 0, 'alpha', 1), (2, 3, 0, 'final', 0), 4096)
known = ['PS', 'FltkAgg', 'GTKAgg', 'QtAgg', 'Agg', 'Cairo', 'GTK', 'GTKCairo', 'WXAgg', 'Paint', 'GD', 'Template', 'SVG', 'GDK', 'TkAgg', 'WX']
major = 2
minor1 = 3
minor2 = 4
rcParams = {'axes.edgecolor': 'black', 'axes.facecolor': 'white', 'axes.grid': False, 'axes.hold': True, 'axes.labelcolor': 'black', 'axes.labelsize': 12.0, 'axes.linewidth': 1.0, 'axes.titlesize': 14.0, 'backend': 'GTKAgg', 'datapath': '/usr/share/matplotlib', ...}
rcParamsDefault = {'axes.edgecolor': 'black', 'axes.facecolor': 'white', 'axes.grid': False, 'axes.hold': True, 'axes.labelcolor': 'black', 'axes.labelsize': 12.0, 'axes.linewidth': 1.0, 'axes.titlesize': 14.0, 'backend': 'GTKAgg', 'datapath': '/usr/share/matplotlib', ...}
s = 'wheel.py~c'
tmp = 0
verbose = <matplotlib.Verbose instance>