MVGaussianSlice.plot_sample (function)
def plot_sample(self, *args, **kwargs)
Plot both a sampled histogram from the distribution. Requires matplotlib to be installed.
See also:
- MVGaussianSlice.plot
- MVGaussianSlice.plot_pdf
- MVGaussianSlice.plot_cdf
- MVGaussianSlice.plot_gaussian
- MVGaussianSlice.plot_uncertainties
Arguments
size(int, optional, default=1e5): number of points to sample for the histogram. See also MVGaussianSlice.sample. Will be ignored ifsamplesis provided.unit(astropy.unit, optional, default=None): units to use along the x-axis. Astropy must be installed. Ifsamplesis provided, the passed values will be assumed to be in the correct units.wrap_at(float, None, or False, optional, default=None): value to use for wrapping. See MVGaussianSlice.wrap. If not provided or None, will use the value from MVGaussianSlice.wrap_at. Note: wrapping is computed before changing units, sowrap_atmust be provided according to MVGaussianSlice.unit notunit. Will be ignored ifsamplesis provided.seed(int, optional): seed to use when sampling. See also MVGaussianSlice.sample. Will be ignored ifsamplesis provided.samples(array, optional, default=None): plot specific sampled values instead of calling MVGaussianSlice.sample internally. Will overridesize.label(string, optional, default=None): override the label on the x-axis. If not provided or None, will use MVGaussianSlice.label. Will only be used ifshow=True. Unit will automatically be appended. Will be ignored ifxlabelis provided.xlabel(string, optional, default=None): override the label on the x-axis without appending the unit. Will overridelabel.show(bool, optional, default=True): whether to show the resulting matplotlib figure.**kwargs: all keyword arguments will be passed on to plt.hist. If not provided,binswill default to the stored bins for Histogram distributions, otherwise will default to 25.
Returns
- the return from plt.hist
Raises
- ImportError: if matplotlib dependency is not met.