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 of ArepoVoronoiGrid’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 is u.cm**-3.

  • bins (list, optional) – The number of bins corresponding to each PDF/CDF. If None (default), they are set to 25.

  • colors (list, optional) – A list of matplotlib-compatible color strings corresponding to each line plotted. If None (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. If None (default), they are set to -.

  • linewidths (list, optional) – A list of linewidths corresponding to each line plotted. If None (default), they are set to 1.5.

  • labels (list, optional) – A list of labels corresponding to each line plotted. If None (default), they are numbered 1, ..., n.

  • cumulative (bool, optional) – If True, plots the CDF, else plots the PDF. Default value is False.

  • fit_spline (bool, optional) – If True, fits a spline interpolator through each PDF/CDF histogram. Default value is False.

  • only_spline (bool, optional) – If True, plots only the spline interpolator and not the PDF/CDF histograms. Default value is False.

  • save (str, optional) – File path to save the plot. If None (default), plot is not saved.

  • **kwargs (dict, optional) – Additional matplotlib-based keyword arguments to control finer details of the plot.

Returns:

fig (Figure) – Main Figure instance.