synthesizer.utils.plt¶
A module containg helper functions for working with matplotlib.
Example usage:
fig, ax = single(3.5) fig, ax, haxx, haxy = single_histxy(size=3.5, set_axis_off=True)
Functions
- synthesizer.utils.plt.single(size=3.5)[source]¶
Set up a matplotlib figure containing a single axis.
- Parameters:
size (float) – The size of the plot along both axes in inches.
- Returns:
The created figure containing the axes. matplotlib.Axes: The axis on which to plot.
- Return type:
matplotlib.Figure
- synthesizer.utils.plt.single_histxy(size=3.5, set_axis_off=True)[source]¶
Get a figure containing an axis, and a histogram on each axis.
- Parameters:
size (float) – The size of the plot along both axes in inches.
set_axis_off (bool) – Should the histograms have their axes removed?
- Returns:
The created figure containing the axes. matplotlib.Axes: The axis on which to plot. matplotlib.Axes: The axis for the x-axis histogram. matplotlib.Axes: The axis for the y-axis histogram.
- Return type:
matplotlib.Figure
- synthesizer.utils.plt.single_wcbar_right(hsize=3.5)[source]¶
Set up a matplotlib figure containing a single axis and a colorbar.
- Parameters:
hsize (float) – The horizontal size of the plot in inches.
- Returns:
The created figure containing the axes. matplotlib.Axes: The axis on which to plot. matplotlib.Axes: The axis for the colorbar.
- Return type:
matplotlib.Figure