uvex_transients.utils.plotting.plot_luminosity_function#
- uvex_transients.utils.plotting.plot_luminosity_function(table, *, band: str | None = None, label: str | None = None, color: str | None = None, fig: Figure | None = None, ax: Axes | None = None, fig_size: tuple = (5.5, 4)) tuple[Figure, Axes][source]#
Plot the luminosity function of a transient class: its stepped density, with the interval of each bin shaded.
Takes the table that
luminosity_function()returns, in either of its two forms. A magnitude function is drawn on a linear axis with the brighter events to the right, as magnitudes are usually shown, and a luminosity function on log axes. Only bins that hold events are drawn, since the interval of an empty bin is an upper limit that spans the whole axis.- Parameters:
table (
QTable) – The luminosity function, withmeta["quantity"]of"luminosity"or"magnitude".band (
str, optional) – The name of the band, for the axis label, for example"V".label (
str, optional) – Legend label of the curve.color (
str, optional) – Color of the curve and its intervals. Defaults to the first color of the style’s cycle.fig (
matplotlib.figure.Figure,matplotlib.axes.Axes, optional) – Existing figure/axes to draw onto, via resolve_fig_axes.ax (
matplotlib.figure.Figure,matplotlib.axes.Axes, optional) – Existing figure/axes to draw onto, via resolve_fig_axes.fig_size (
tuple, optional) – Passed to resolve_fig_axes when creating a new figure.
- Returns:
fig (
matplotlib.figure.Figure) – The resolved figure.ax (
matplotlib.axes.Axes) – The axes the function was drawn onto.