qp.plotting: Tools for plotting
Functions to plot PDFs
- qp.plotting.make_figure_axes(xlim: tuple[float, float], **kwargs: Any)[source]
Build a figure and a set of figure axes to plot data on
- qp.plotting.get_axes_and_xlims(**kwargs: Any)[source]
Get and return the axes and xlims from the kwargs
- qp.plotting.plot_pdf_on_axes(axes, pdf: Ensemble, xvals: ArrayLike, **kwargs: Any)[source]
Plot a PDF on a set of axes, by evaluating it a set of points
- qp.plotting.plot_dist_pdf(pdf: Ensemble, **kwargs: Any)[source]
Plot a PDF on a set of axes, using the axes limits
- qp.plotting.plot_pdf_quantiles_on_axes(axes, xvals: ArrayLike, yvals: ArrayLike, quantiles: tuple[ndarray, ndarray], **kwargs: Any)[source]
Plot a PDF on a set of axes, by evaluating at the quantiles provided
- Parameters:
- axes
Axes The axes we want to plot the data on
- xvals
ArrayLike Pdf xvalues
- yvals
ArrayLike Pdf yvalues
- quantiles
tuple[np.ndarray,np.ndarray] The quantiles that define the distribution pdf
- **kwargs
Passed directly to the
matplotlibplot function
- axes
- Returns:
AxesThe axes the data are plotted on
- Other Parameters:
- npoints
int Number of points to use in the plotting. Evenly spaced along the axis provided.
- npoints
- qp.plotting.plot_pdf_histogram_on_axes(axes, hist: ArrayLike, **kwargs: Any)[source]
Plot a PDF on a set of axes, by plotting the histogrammed data
- Parameters:
- axes
Axes The axes we want to plot the data on
- hist
ArrayLike Histogram data
- **kwargs
Passed directly to the
matplotlibplot function
- axes
- Returns:
AxesThe axes the data are plotted on
- Other Parameters:
- npoints
int Number of points to use in the plotting. Evenly spaced along the axis provided.
- npoints
- qp.plotting.plot_pdf_samples_on_axes(axes, pdf: Ensemble, samples: ArrayLike, **kwargs: Any)[source]
Plot a PDF on a set of axes, by displaying a set of samples from the PDF
- Parameters:
- axes
Axes The axes we want to plot the data on
- pdf
Ensemble The distribution we want to plot
- samples
ArrayLike Points sampled from the PDF
- **kwargs
Passed directly to the
matplotlibplot function
- axes
- Returns:
AxesThe axes the data are plotted on
- qp.plotting.plot_native(pdf, **kwargs)[source]
Utility function to plot a pdf in a format that is specific to that type of pdf
- qp.plotting.plot(pdf, **kwargs)[source]
Utility function to plot a pdf in a format that is specific to that type of pdf