galpy.potential.plotPotentials

galpy.potential.plotPotentials(Pot, rmin=0.0, rmax=1.5, nrs=21, zmin=-0.5, zmax=0.5, nzs=21, phi=None, xy=False, xrange=None, yrange=None, t=0.0, effective=False, Lz=None, ncontours=21, savefilename=None, aspect=None, justcontours=False, levels=None, cntrcolors=None)[source]

Plot a set of potentials.

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

  • 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 potential in X-Y. Default is False.

  • effective (bool, optional) – If True, plot the effective potential Phi + Lz^2/2/R^2. Default is False.

  • Lz (float, optional) – Angular momentum to use for the effective potential when effective=True. Default is None.

  • xrange (list, optional) – Minimum and maximum R values to plot. Default is None.

  • yrange (list, optional) – Minimum and maximum z values to plot. Default is None.

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

  • levels (array-like, optional) – Contours to plot. Default is None.

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

  • cntrcolors (str or array-like, optional) – Colors of the contours (single color or array with length ncontours). Default is None.

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

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

Return type:

galpy.util.plot.dens2d return value

Notes

  • 2010-07-09 - Written by Bovy (NYU).