fiesta.disperse.Filament.plot_density_profile#

Filament.plot_density_profile(avg, length_unit=Unit('cm'), ndensity_unit=Unit('1 / cm3'), scatter=True, contours=None, save=None, **kwargs)[source]#

Plot mass-weighted 2d histogram projection of the AREPO Voronoi grid along an axis.

Parameters:
  • avg (ArepoVoronoiGrid) – Source ArepoVoronoiGrid to use for plotting the profile

  • length_unit (Unit, optional) – The unit of length to use. If None (default), takes the value u.pix if scale='pixel', else u.cm if scale='physical'.

  • ndensity_unit (Unit, optional) – The unit of number density to use. Default value is u.cm**-3.

  • scatter (bool, optional) – If True (default), plots the scatter of radius versus density for each cell. Its color can be controlled through color argument in **kwargs.

  • contours (int, optional) – Number of contours, estimated through scipy.stats.gaussian_kde, of the scatter. If None (default), no contour plot is made. Its color can be controlled through cmap argument in **kwargs.

  • save (str, optional) – The name of the file to save the plot as. 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.