galpy.potential.plotDensities

galpy.potential.plotDensities(Pot, rmin=0.0, rmax=1.5, nrs=21, zmin=-0.5, zmax=0.5, nzs=21, phi=None, xy=False, t=0.0, ncontours=21, savefilename=None, aspect=None, log=False, justcontours=False, **kwargs)[source]

Plot the density of a set of potentials.

Parameters:
  • Pot (Potential or list of Potential instances) – Potential(s) to evaluate.

  • rmin (float, optional) – Minimum R (can be Quantity). Default is 0.0.

  • rmax (float, optional) – Maximum R (can be Quantity). Default is 1.5.

  • nrs (int, optional) – Grid in R. Default is 21.

  • zmin (float, optional) – Minimum z (can be Quantity). Default is -0.5.

  • zmax (float, optional) – Maximum z (can be Quantity). Default is 0.5.

  • nzs (int, optional) – Grid in z. Default is 21.

  • phi (float, optional) – Azimuth to use for non-axisymmetric potentials. Default is None.

  • t (float, optional) – Time to use to evaluate potential. Default is 0.0.

  • xy (bool, optional) – If True, plot the density in X-Y. Default is False.

  • ncontours (int, optional) – Number of contours. Default is 21.

  • justcontours (bool, optional) – If True, just plot contours. Default is False.

  • savefilename (str, optional) – Save to or restore from this savefile (pickle). Default is None.

  • log (bool, optional) – If True, plot the log density. Default is False.

  • aspect (float, optional) – Aspect ratio of the plot. Default is None.

  • **kwargs (dict, optional) – Additional keyword arguments to pass to plot.dens2d.

Return type:

galpy.util.plot.dens2d return value

Notes

  • 2013-07-05 - Written - Bovy (IAS)

  • 2023-04-24 - Allow plotting in physical coordinates - Bovy (UofT)