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:
- matplotlib.Figure
The created figure containing the axes.
- matplotlib.Axis
The axis on which to plot.
- synthesizer.utils.plt.single_histxy(size=3.5, set_axis_off=True)[source]¶
Set up a matplotlib figure containing a single 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:
- matplotlib.Figure
The created figure containing the axes.
- ax (matplotlib.Axis)
The axis on which to plot.
- haxx (matplotlib.Axis)
The axis for the x histogram.
- haxy (matplotlib.Axis)
The axis for the y histogram.
- 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:
- matplotlib.Figure
The created figure containing the axes.
- ax (matplotlib.Axis)
The axis on which to plot.
- cax (matplotlib.Axis)
The axis for the colorbar.