fiesta.plotter.plot_ndensity_PDFs#
- fiesta.plotter.plot_ndensity_PDFs(avgs, ndensity_unit=Unit('1 / cm3'), bins=None, colors=None, linestyles=None, linewidths=None, labels=None, cumulative=False, fit_spline=False, only_spline=False, save=None, **kwargs)[source]#
Plot the mass-weighted logarithmic probability distribution function (PDF) or cumulative distribution function (CDF) histograms of the number density of AREPO Voronoi grids.
- Parameters:
avgs (
list
ofArepoVoronoiGrid
’s) – The list of AREPO Voronoi grid instances to plot the PDFs/CDFs of.ndensity_unit (
Unit
, optional) – The unit of number density to use. Default value isu.cm**-3
.bins (
list
, optional) – The number of bins corresponding to each PDF/CDF. IfNone
(default), they are set to25
.colors (
list
, optional) – A list of matplotlib-compatible color strings corresponding to each line plotted. IfNone
(default), colors are picked by cycling through matplotlib tab10 colour palette.linestyles (
list
, optional) – A list of matplotlib-compatible linestyle strings corresponding to each line plotted. IfNone
(default), they are set to-
.linewidths (
list
, optional) – A list of linewidths corresponding to each line plotted. IfNone
(default), they are set to1.5
.labels (
list
, optional) – A list of labels corresponding to each line plotted. IfNone
(default), they are numbered1, ..., n
.cumulative (
bool
, optional) – IfTrue
, plots the CDF, else plots the PDF. Default value isFalse
.fit_spline (
bool
, optional) – IfTrue
, fits a spline interpolator through each PDF/CDF histogram. Default value isFalse
.only_spline (
bool
, optional) – IfTrue
, plots only the spline interpolator and not the PDF/CDF histograms. Default value isFalse
.save (
str
, optional) – File path to save the plot. IfNone
(default), plot is not saved.**kwargs (
dict
, optional) – Additional matplotlib-based keyword arguments to control finer details of the plot.
- Returns: