py21cmfast.plotting.lightcone_sliceplot(lightcone: LightCone, kind: str = 'brightness_temp', lightcone2: LightCone = None, vertical: bool = False, xlabel: str | None = None, ylabel: str | None = None, cbar_label: str | None = None, zticks: str = 'redshift', fig: matplotlib.figure.Figure | None = None, ax: matplotlib.axes._axes.Axes | None = None, **kwargs)[source]

Create a 2D plot of a slice through a lightcone.

  • lightcone (Lightcone) – The lightcone object to plot

  • kind (str, optional) – The attribute of the lightcone to plot. Must be an array.

  • lightcone2 (str, optional) – If provided, plot the _difference_ of the selected attribute between the two lightcones.

  • vertical (bool, optional) – Whether to plot the redshift in the vertical direction.

  • cbar_label (str, optional) – A label for the colorbar. Some quantities have automatically chosen labels, but these can be removed by setting cbar_label=’’.

  • zticks (str, optional) – Defines the co-ordinates of the ticks along the redshift axis. Can be “redshift” (default), “frequency”, “distance” (which starts at zero for the lowest redshift) or the name of any function in an astropy cosmology that is purely a function of redshift.

  • kwargs – Passed through to imshow().


  • fig – The matplotlib Figure object

  • ax – The matplotlib Axis object onto which the plot was drawn.