| Trees | Indices | Help |
|
|---|
|
|
Line-based and matrix-based plotting commands using MatPlotLib.
Before importing this file, you will probably want to do something like:
from matplotlib import rcParams rcParams['backend']='TkAgg'
to select a backend, or else select an appropriate one in your matplotlib.rc file (if any). There are many backends available for different GUI or non-GUI uses.
$Id: pylabplot.py 11307 2010-07-27 16:40:49Z ceball $
Version: $Revision: 11307 $
|
|||
|
ParameterizedFunction Acts like a Python function, but with arguments that are Parameters. |
|||
|
normalize_path Convert a UNIX-style path to the current OS's format, typically for creating a new file or directory. |
|||
|
PositionMeasurementCommand Parameterized command for measuring topographic position. |
|||
|
FeatureCurveCommand A callable Parameterized command for measuring tuning curves. |
|||
|
UnitCurveCommand Measures tuning curve(s) of particular unit(s). |
|||
|
Command Parameterized command: any error when the command is run (called) will not raise an exception, but will instead generate a warning. |
|||
|
PylabPlotCommand Parameterized command for plotting using Matplotlib/Pylab. |
|||
|
vectorplot Simple line plotting for any vector or list of numbers. |
|||
|
matrixplot Simple plotting for any matrix as a bitmap with axes. |
|||
|
matrixplot3d Simple plotting for any matrix as a 3D wireframe with axes. |
|||
|
histogramplot Compute and plot the histogram of the supplied data. |
|||
|
gradientplot Compute and show the gradient plot of the supplied data. |
|||
|
fftplot Compute and show the 2D Fast Fourier Transform (FFT) of the supplied data. |
|||
|
activityplot Plots the activity in a sheet. |
|||
|
topographic_grid By default, plot the XPreference and YPreference preferences for all Sheets for which they are defined, using MatPlotLib. |
|||
|
overlaid_plots Use matplotlib to make a plot combining a bitmap and line-based overlays. |
|||
|
tuning_curve Plot a tuning curve for a feature, such as orientation, contrast, or size. |
|||
|
cyclic_tuning_curve Same as tuning_curve, but rotates the curve so that minimum y values are at the minimum x value to make the plots easier to interpret. |
|||
|
plot_tracked_attributes Plots parameter values associated with an AttributeTrackingTF. |
|||
|
plot_modulation_ratio This function computes the modulation ratios of neurons in the specified sheets and plots their histograms. |
|||
|
measure_position_pref Measure a position preference map by collating the response to patterns. |
|||
|
measure_cog Calculate center of gravity (CoG) for each CF of each unit in each CFSheet. |
|||
|
measure_or_tuning_fullfield Measures orientation tuning curve(s) of a particular unit using a full-field sine grating stimulus. |
|||
|
measure_or_tuning Measures orientation tuning curve(s) of a particular unit. |
|||
|
measure_size_response Measure receptive field size of one unit of a sheet. |
|||
|
measure_contrast_response Measures contrast response curves for a particular unit. |
|||
|
measure_orientation_contrast Measures the response to a center sine grating disk and a surround sine grating ring at different contrasts of the central disk. |
|||
| test_measure | |||
|
v Parameterized command for plotting using Matplotlib/Pylab. |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| ImportErrorRaisingFakeModule | |||
pi = 3.14159265359
|
|||
sqrt = <ufunc 'sqrt'>
|
|||
cos = <ufunc 'cos'>
|
|||
sin = <ufunc 'sin'>
|
|||
log10 = <ufunc 'log10'>
|
|||
Float =
|
|||
abs = <ufunc 'absolute'>
|
|||
pg = TemplatePlotGroup(auto_refresh=False, category='Preferenc
|
|||
__package__ =
|
|||
k =
|
|||
|
|||
Permute the dimensions of an array. Parameters
Returns
See Alsorollaxis Examples>>> x = np.arange(4).reshape((2,2)) >>> x array([[0, 1], [2, 3]]) >>> np.transpose(x) array([[0, 2], [1, 3]]) >>> x = np.ones((1, 2, 3)) >>> np.transpose(x, (1, 0, 2)).shape (2, 1, 3) |
Returns the outer product of two vectors. Given two vectors, [a0, a1, ..., aM] and [b0, b1, ..., bN], the outer product becomes: [[a0*b0 a0*b1 ... a0*bN ] [a1*b0 . [ ... . [aM*b0 aM*bN ]] Parameters
Returns
NotesThe outer product of vectors is a special case of the Kronecker product. Examples>>> x = np.array(['a', 'b', 'c'], dtype=object) >>> np.outer(x, [1, 2, 3]) array([[a, aa, aaa], [b, bb, bbb], [c, cc, ccc]], dtype=object) |
Return a new array of given shape and type, filled with ones. Please refer to the documentation for See Alsozeros Examples>>> np.ones(5) array([ 1., 1., 1., 1., 1.]) >>> np.ones((5,), dtype=np.int) array([1, 1, 1, 1, 1]) >>> np.ones((2, 1)) array([[ 1.], [ 1.]]) >>> s = (2,2) >>> np.ones(s) array([[ 1., 1.], [ 1., 1.]]) |
Compute the 2-dimensional discrete Fourier Transform
This function computes the *n*-dimensional discrete Fourier Transform
over any axes in an *M*-dimensional array by means of the
Fast Fourier Transform (FFT). By default, the transform is computed over
the last two axes of the input array, i.e., a 2-dimensional FFT.
Parameters
----------
a : array_like
Input array, can be complex
s : sequence of ints, optional
Shape (length of each transformed axis) of the output
(`s[0]` refers to axis 0, `s[1]` to axis 1, etc.).
This corresponds to `n` for `fft(x, n)`.
Along each axis, if the given shape is smaller than that of the input,
the input is cropped. If it is larger, the input is padded with zeros.
if `s` is not given, the shape of the input (along the axes specified
by `axes`) is used.
axes : sequence of ints, optional
Axes over which to compute the FFT. If not given, the last 2
axes are used. A repeated index in `axes` means the transform over
that axis is performed multiple times. A one-element sequence means
that a one-dimensional FFT is performed.
Returns
-------
out : complex ndarray
The truncated or zero-padded input, transformed along the axes
indicated by `axes`, or the last two axes if `axes` is not given.
Raises
------
ValueError
if `s` and `axes` have different length, or
`axes` not given and `len(s) != 2`
IndexError
if an element of `axes` is larger than than the number of axes of `a`.
See Also
--------
numpy.fft : Overall view of discrete Fourier transforms, with definitions
and conventions used.
ifft2 : The inverse two-dimensional FFT
fft : The one-dimensional FFT
fftn : The *n*-dimensional FFT
fftshift : shifts zero-frequency terms to centre of array.
For two-dimensional input, swaps first and third quadrants, and second
and fourth quadrants.
Notes
-----
`fft2` is just `fftn` with a different default for `axes`.
The output, analogously to `fft`, contains the term for zero frequency in
the low-order corner of the transformed axes, the positive frequency terms
in the first half of these axes, the term for the Nyquist frequency in the
middle of the axes and the negative frequency terms in the second half of
the axes, in order of decreasingly negative frequency.
See `fftn` for details and a plotting example, and `numpy.fft` for
definitions and conventions used.
Examples
--------
>>> from numpy import mgrid
>>> from numpy.fft import fft2
>>> a = mgrid[:5, :5][0]
>>> fft2(a)
array([[ 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j],
[ 5.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j],
[ 10.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j],
[ 15.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j],
[ 20.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j]])
|
Shift zero-frequency component to center of spectrum. This function swaps half-spaces for all axes listed (defaults to all). If len(x) is even then the Nyquist component is y[0]. Parameters
See Alsoifftshift |
Circularly alias the numeric value x into the range [lower,upper). Valid for cyclic quantities like orientations or hues. |
A range function that accepts float increments. Otherwise, works just as the inbuilt range() function. If inclusive is False, as in the default, the range is exclusive (not including the end value), as in the inbuilt range(). If inclusive is true, the range may include the end value. 'All theoretic restrictions apply, but in practice this is more useful than in theory.' From: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66472 |
Factory function for constructing a Plot object whose type is not yet known. Typically, a TemplatePlot will be constructed through this call, because it selects the appropriate type automatically, rather than calling one of the Plot subclasses automatically. See TemplatePlot.__init__ for a description of the arguments. |
Create a new PlotGroup and add it to the plotgroups list. Convenience function to make it simpler to use the name of the PlotGroup as the key in the plotgroups list. template_plot_type: Whether the plots are bitmap images or curves ('curve'). |
Simple plotting for any matrix as a 3D surface with axes. Currently requires the gnuplot-py package to be installed, plus the external gnuplot program; likely to be removed once Matplotlib supports 3D plots better. Unlikely to work on non-UNIX systems. Should return when it completes, but for some reason the Topographica prompt is not available until this command finishes. |
Plot a coordinate mapping for a sheet. Given a CoordinateMapperFn (as for a CFProjection) and a sheet of the projection, plot a grid showing where the sheet's units are mapped. |
|
|||
pg
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Aug 5 14:59:19 2010 | http://epydoc.sourceforge.net |