Module: special

Module for special-purpose plots.

mpltools.special.errorfill(x, y[, yerr, ...]) Plot data with errors marked by a filled region.
mpltools.special.hinton(inarray[, max_value]) Plot Hinton diagram for visualizing the values of a 2D array.

errorfill

mpltools.special.errorfill(x, y, yerr=None, xerr=None, color=None, ls=None, lw=None, alpha=1, alpha_fill=0.29999999999999999, label='', label_fill='', ax=None)

Plot data with errors marked by a filled region.

Parameters :

x, y : arrays

Coordinates of data.

yerr, xerr: [scalar | N, (N, 1), or (2, N) array] :

Error for the input data. - If scalar, then filled region spans y +/- yerr or x +/- xerr.

color : Matplotlib color

Color of line and fill region.

ls : Matplotlib line style

Style of the line

lw : Matplotlib line width, float value in points

Width of the line

alpha : float

Opacity used for plotting.

alpha_fill : float

Opacity of filled region. Note: the actual opacity of the fill is alpha * alpha_fill.

label : str

Label for line.

label_fill : str

Label for filled region.

ax : Axis instance

The plot is drawn on axis ax. If None the current axis is used

hinton

mpltools.special.hinton(inarray, max_value=None)

Plot Hinton diagram for visualizing the values of a 2D array.

Plot representation of an array with positive and negative values represented by white and black squares, respectively. The size of each square represents the magnitude of each value.

Unlike the hinton demo in the matplotlib gallery [R2], this implementation uses a RegularPolyCollection to draw squares, which is much more efficient than drawing individual Rectangles.

Note

This function inverts the y-axis to match the origin for arrays.

[R2]http://matplotlib.sourceforge.net/examples/api/hinton_demo.html
Parameters :

inarray : array

Array to plot.

max_value : float

Any absolute value larger than max_value will be represented by a unit square.

Table Of Contents

Previous topic

Module: layout

Next topic

Module: style