Module plottools.common

Reduce common axis labels.

Figure member functions

Install/uninstall common functions

You usually do not need to call these functions. Upon loading the common module, install_common() is called automatically.

Functions

def common_xlabels(fig, *axes)

Reduce common xlabels.

Remove all xlabels except for one that is centered at the bottommost axes.

Parameters

fig : matplotlib figure
The figure containing the axes.
axes : Sequence of matplotlib axes
Axes whose xlabels should be merged. If not specified, take all axes of the figure.
def common_ylabels(fig, *axes)

Reduce common ylabels.

Remove all ylabels except for one that is centered at the leftmost axes.

Parameters

fig : matplotlib figure
The figure containing the axes.
axes : None or sequence of matplotlib axes
Axes whose ylabels should be merged. If not specified, take all axes of the figure.
def common_xticks(fig, *axes)

Reduce common xtick labels and xlabels.

Keep xtick labels only at the lowest axes and center the common xlabel.

Parameters

fig : matplotlib figure
The figure containing the axes.
axes : None or sequence of matplotlib axes
Axes whose xticks should be combined. If not specified, take all axes of the figure.
def common_yticks(fig, *axes)

Reduce common ytick labels and ylabels.

Keep ytick labels only at the leftmost axes and center the common ylabel.

Parameters

fig : matplotlib figure
The figure containing the axes.
axes : None or sequence of matplotlib axes
Axes whose yticks should be combined. If not specified, take all axes of the figure.
def common_xspines(fig, *axes)

Reduce common x-spines, xtick labels, and xlabels.

Keep spine and xtick labels only at the lowest axes and center the common xlabel.

Parameters

fig : matplotlib figure
The figure containing the axes.
axes : None or sequence of matplotlib axes
Axes whose xticks should be combined. If not specified, take all axes of the figure.
def common_yspines(fig, *axes)

Reduce common y-spines, ytick labels, and ylabels.

Keep spine and ytick labels only at the lowest axes and center the common ylabel.

Parameters

fig : matplotlib figure
The figure containing the axes.
axes : None or sequence of matplotlib axes
Axes whose yticks should be combined. If not specified, take all axes of the figure.
def install_common()

Install functions of the common module in matplotlib.

See Also

uninstall_common()

def uninstall_common()

Uninstall all code of the common module from matplotlib.

See Also

install_common()

def demo()

Run a demonstration of the common module.