Plotting library derived from matplotlib: ploTools

Nice predefined plots using matplotlib

class ploTools.movie(title='movie', fps=15)[source]

A class for making movie using matplotlib

Methods

make_zonal_movie(lat, var, **kwargs)[source]
class ploTools.subplot(*args, **kwargs)[source]

Sublplot class containing axes matplotlib instances

Methods

grid(b=None, which=u'major', axis=u'both', **kwargs)[source]

See matplotlib.axes.Axes.grid method in matplotlib documentation

legend(*args, **kwargs)[source]

See matplotlib.axes.Axes.legend method in matplotlib documentation

nice_lat_ticklabels(lat, axis='y', fontdict=None, minor=False, **kwargs)[source]

Make nice ticklabels for the latitude axis

Parameters:

lat : 1darray

The origninal longitude array

axis : optional, {‘x’, ‘y’}

The plot axis corresponding to the longitude array

**kwargs : optional, keyword arguments

nice_lon_ticklabels(lon, axis='x', fontdict=None, minor=False, **kwargs)[source]

Make nice ticklabels for the longitude axis

Parameters:

lon : 1darray

The origninal longitude array

axis : optional, {‘x’, ‘y’}

The plot axis corresponding to the longitude array

**kwargs : optional, keyword arguments

pdf_plot(x, bins=10, normed=False, weights=None, cumulative=False, bottom=None, histtype=u'bar', align=u'mid', orientation=u'vertical', rwidth=None, log=False, color=None, stacked=False, **kwargs)[source]

Plot the probability density function associated with the input variable

Parameters:

x : array_like

bins : int, optional

normed : bool, optional

weights : array_like, optional

cumulative: bool, optional

plot(*args, **kwargs)[source]

See matplotlib.axes.Axes.plot method in matplotlib documentation

scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None, vmin=None, vmax=None, alpha=None, linewidths=None, verts=None, **kwargs)[source]

Make a scatter plot of x vs y, where x and y are sequence like objects of the same lengths.

See matplotlib.axes.Axes.scatter method in matplotlib documentation.

set_title(label, fontdict=None, loc=u'center', **kwargs)[source]

Set the title of the subplot.

See matplotlib.axes.Axes.set_title method in matplotlib documentation.

set_xlabel(xlabel, fontdict=None, labelpad=None, **kwargs)[source]

See matplotlib.axes.Axes.set_xlabel method in matplotlib documentation

set_xticklabels(labels, fontdict=None, minor=False, **kwargs)[source]

See matplotlib.axes.Axes.set_xticklabels method in matplotlib documentation

set_xticks(ticks, minor=False)[source]

See matplotlib.axes.Axes.set_xticks method in matplotlib documentation

set_yticklabels(labels, fontdict=None, minor=False, **kwargs)[source]

See matplotlib.axes.Axes.set_yticklabels method in matplotlib documentation

set_yticks(ticks, minor=False)[source]

See matplotlib.axes.Axes.set_yticks method in matplotlib documentation

spectrum2d_plot(x, y, z, xlog=False, ylog=False, zlog=False, **kwargs)[source]

Define a nice spectrum with twin x-axis and twin y-axis, one with frequencies, the other one with periods, on a predefined axis object.

Parameters:

x,y : array_like

1D array defining the coordinates

z : array_like

2D array

xlog, ylog, zlog : bool, optional

Define if the x-axis, y-axis and z-axis are plotted with a log scale

**** kwargs** : optional keyword arguments

See matplotlib.axes.Axes.contourf method in matplotlib documentation

spectrum_plot(x, y, **kwargs)[source]

Define a nice spectrum with twin x-axis, one with frequencies, the other one with periods, on a predefined axis object ** kwargs : optional keyword arguments

See the plot method in matplotlib documentation
timelon_plot(lon, time, value, v_min=None, v_max=None, nb_levels=10, **kwargs)[source]

Create a time-longitude plot (Hovmueller)

Parameters:

lon : 1d array

The longitude array

time : 1d array

The time array

value : 2d array

The variable to plot

**** kwargs** : optional keyword arguments

See the contourf method in matplotlib documentation

Previous topic

Linear filtering library

Next topic

Command-line tools

This Page