fiesta.arepo.ArepoCubicGrid.plot_slice#
- ArepoCubicGrid.plot_slice(x=None, y=None, z=None, length_unit=None, ndensity_unit=Unit('1 / cm3'), log=False, mask_below=None, cmap='magma', save=None, **kwargs)[source]#
Plot a slice of 3D number density grid.
- Parameters:
x (
int
, optional) – Integer corresponding to \(x\)-slice of the grid. One ofx
,y
orz
is required.y (
int
, optional) – Integer corresponding to \(y\)-slice of the grid. One ofx
,y
orz
is required.z (
int
, optional) – Integer corresponding to \(z\)-slice of the grid. One ofx
,y
orz
is required.length_unit (
Unit
, optional) – The unit of length to use. IfNone
(default), takes the valueu.pix
ifscale='pixel'
, elseu.cm
ifscale='physical'
.ndensity_unit (
Unit
, optional) – The unit of number density to use. Default value isu.cm**-3
.log (
bool
, optional) – IfTrue
, the number density is plotted on a log-scale. IfFalse
(default), it is plotted on a linear scale.mask_below (
float
orQuantity
, optional) – The number density below which all grid points are omitted from the plot. This ensures only certain dense regions are plotted. Iffloat
, then assumed to be inndensity_unit
units.cmap (
str
orColormap
, optional) – Colormap of the plot. Default is'magma'
.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: