Module plottools.common
Reduce common axis labels.
Figure member functions
common_xlabels()
: reduce common xlabels.common_ylabels()
: reduce common ylabels.common_xticks()
: reduce common xtick labels and xlabels.common_yticks()
: reduce common ytick labels and ylabels.common_xspines()
: reduce common x-spines, xtick labels, and xlabels.common_yspines()
: reduce common y-spines, ytick labels, and ylabels.
Install/uninstall common functions
You usually do not need to call these functions. Upon loading the common
module, install_common()
is called automatically.
install_common()
: install functions of the common module in matplotlib.uninstall_common()
: uninstall all code of the common module from matplotlib.
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
ofmatplotlib 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
orsequence
ofmatplotlib 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
orsequence
ofmatplotlib 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
orsequence
ofmatplotlib 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
orsequence
ofmatplotlib 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
orsequence
ofmatplotlib axes
- Axes whose yticks should be combined. If not specified, take all axes of the figure.
def install_common()
def uninstall_common()
def demo()
-
Run a demonstration of the common module.