BaseDistribution.plot_gaussian (function)
def plot_gaussian(self, x=None, unit=None, wrap_at=None, label=None, xlabel=None, show=False, **kwargs)
Plot the gaussian distribution that would result from calling BaseDistribution.to_gaussian with the same arguments.
Note that for distributions in which BaseDistribution.to_gaussian calls BaseDistribution.to_histogram under-the-hood, this could result in slightly different distributions for each call.
See also:
- BaseDistribution.plot
- BaseDistribution.plot_sample
- BaseDistribution.plot_pdf
- BaseDistribution.plot_cdf
- BaseDistribution.plot_uncertainties
x
(array, optional, default=None): the numpy array at which to sample the value on the x-axis. Ifunit
is not None, the value ofx
are assumed to be in the original units BaseDistribution.unit, notunit
. If not provided or None,x
will be based to cover the 99.9% of all distributions (see BaseDistribution.interval) with 1000 points and 10% padding.unit
(astropy.unit, optional, default=None): units to use along the x-axis. Astropy must be installed.wrap_at
(float, None, or False, optional, default=None): value to use for wrapping. See BaseDistribution.wrap. If not provided or None, will use the value from BaseDistribution.wrap_at. Note: wrapping is computed before changing units, sowrap_at
must be provided according to BaseDistribution.unit notunit
.label
(string, optional, default=None): override the label on the x-axis. If not provided or None, will use BaseDistribution.label. Will only be used ifshow=True
. Unit will automatically be appended. Will be ignored ifxlabel
is 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
: keyword arguments forsigma
,N
,bins
,range
will be passed on to BaseDistribution.to_gaussian (must be accepted by the given distribution type). All other keyword arguments will be passed on to Gaussian.plot_pdf on the resulting distribution.
- the return from plt.plot
- ImportError: if matplotlib dependency is not met.