Logo Search packages:      
Sourcecode: matplotlib version File versions

matplotlib::mlab Namespace Reference


Detailed Description


Numerical python functions written for compatability with matlab(TM)
commands with the same names.

Matlab(TM) compatible functions
-------------------------------

:func:`cohere`
  Coherence (normalized cross spectral density)

:func:`csd`
  Cross spectral density uing Welch's average periodogram

:func:`detrend`
  Remove the mean or best fit line from an array

:func:`find`
  Return the indices where some condition is true;
 numpy.nonzero is similar but more general.

:func:`griddata`
  interpolate irregularly distributed data to a
     regular grid.

:func:`prctile`
  find the percentiles of a sequence

:func:`prepca`
  Principal Component Analysis

:func:`psd`
  Power spectral density uing Welch's average periodogram

:func:`rk4`
  A 4th order runge kutta integrator for 1D or ND systems

:func:`specgram`
  Spectrogram (power spectral density over segments of time)

Miscellaneous functions
-------------------------

Functions that don't exist in matlab(TM), but are useful anyway:

:meth:`cohere_pairs`
    Coherence over all pairs.  This is not a matlab function, but we
    compute coherence a lot in my lab, and we compute it for a lot of
    pairs.  This function is optimized to do this efficiently by
    caching the direct FFTs.

:meth:`rk4`
    A 4th order Runge-Kutta ODE integrator in case you ever find
    yourself stranded without scipy (and the far superior
    scipy.integrate tools)

record array helper functions
-------------------------------

A collection of helper methods for numpyrecord arrays

.. _htmlonly::

    See :ref:`misc-examples-index`

:meth:`rec2txt`
    pretty print a record array

:meth:`rec2csv`
    store record array in CSV file

:meth:`csv2rec`
    import record array from CSV file with type inspection

:meth:`rec_append_fields`
    adds  field(s)/array(s) to record array

:meth:`rec_drop_fields`
    drop fields from record array

:meth:`rec_join`
    join two record arrays on sequence of fields

:meth:`rec_groupby`
    summarize data by groups (similar to SQL GROUP BY)

:meth:`rec_summarize`
    helper code to filter rec array fields into new fields

For the rec viewer functions(e rec2csv), there are a bunch of Format
objects you can pass into the functions that will do things like color
negative values red, set percent formatting and scaling, etc.

Example usage::

    r = csv2rec('somefile.csv', checkrows=0)

    formatd = dict(
weight = FormatFloat(2),
change = FormatPercent(2),
cost   = FormatThousands(2),
)


    rec2excel(r, 'test.xls', formatd=formatd)
    rec2csv(r, 'test.csv', formatd=formatd)
    scroll = rec2gtk(r, formatd=formatd)

    win = gtk.Window()
    win.set_size_request(600,800)
    win.add(scroll)
    win.show_all()
    gtk.main()


Deprecated functions
---------------------

The following are deprecated; please import directly from numpy (with
care--function signatures may differ):


:meth:`conv`
    convolution  (numpy.convolve)

:meth:`corrcoef`
    The matrix of correlation coefficients

:meth:`hist`
    Histogram (numpy.histogram)

:meth:`linspace`
    Linear spaced array from min to max

:meth:`load`
    load ASCII file - use numpy.loadtxt

:meth:`meshgrid`
    Make a 2D grid from 2 1 arrays (numpy.meshgrid)

:meth:`polyfit`
    least squares best polynomial fit of x to y (numpy.polyfit)

:meth:`polyval`
    evaluate a vector for a vector of polynomial coeffs (numpy.polyval)

:meth:`save`
    save ASCII file - use numpy.savetxt

:meth:`trapz`
    trapeziodal integration (trapz(x,y) -> numpy.trapz(y,x))

:meth:`vander`
    the Vandermonde matrix (numpy.vander)


Classes

class  FIFOBuffer
class  FormatBool
class  FormatDate
class  FormatDatetime
class  FormatFloat
class  FormatFormatStr
class  FormatInt
class  FormatMillions
class  FormatObj
class  FormatPercent
class  FormatString
class  FormatThousands

Functions

def _norm
def _spectral_helper
def amap
def approx_real
def base_repr
def binary_repr
def bivariate_normal
def center_matrix
def cohere
def cohere_pairs
def contiguous_regions
def conv
def corrcoef
def csd
def csv2rec
def csvformat_factory
def demean
def detrend
def detrend_linear
def detrend_mean
def detrend_none
def diagonal_matrix
def dist
def dist_point_to_segment
def distances_along_curve
def donothing_callback
def entropy
def exp_safe
def fftsurr
def find
def frange
def fromfunction_kw
def get_formatd
def get_sparse_matrix
def get_xyz_where
def griddata
def hist
def identity
def inside_poly
def is_closed_polygon
def ispower2
def isvector
def l1norm
def l2norm
def less_simple_linear_interpolation
def levypdf
def liaupunov
def linspace
def load
def log2
def logspace
def longest_contiguous_ones
def longest_ones
def mean
def mean_flat
def meshgrid
def mfuncC
def movavg
def norm
def norm_flat
def normpdf
def orth
def path_length
def poly_below
def poly_between
def polyfit
def polyval
def prctile
def prctile_rank
def prepca
def psd
def quad2cubic
def rank
def rec2csv
def rec2txt
def rec_append_field
def rec_append_fields
def rec_drop_fields
def rec_groupby
def rec_join
def rec_summarize
def rec_view
def rem
def rk4
def rms_flat
def safe_isinf
def safe_isnan
def save
def segments_intersect
def slopes
def specgram
def sqrtm
def stineman_interp
def sum_flat
def trapz
def vander
def vector_lengths
def window_hanning
def window_none
def zeros_like

Variables

string _coh_error
dictionary defaultformatd
float exp_safe_MAX = 1.7976931348623157e+308
tuple exp_safe_MIN = math.log(2.2250738585072014e-308)
 fh
tuple kwdocd = dict()
 ma = np.ma


Generated by  Doxygen 1.6.0   Back to index