Interactive Single Plot

Classes API

class mw_plot.MWPlotBokeh(mode='face-on', center=<Quantity [0., 0.] kpc>, radius=<Quantity 90750. lyr>, unit=Unit("kpc"), coord='galactic', annotation=True, rot90=0, grayscale=False, r0=8.125)[source]

MWPlot Brokeh class plotting with Bokeh

Parameters:
  • mode (string, either 'face-on' or 'edge-on') – whether plot edge-on or face-on milkyway

  • center (astropy.Quantity) – Coordinates of the center of the plot with astropy units

  • radius (astropy.Quantity) – Radius of the plot with astropy units

  • unit (astropy.Quantity) – astropy units

  • coord (str) – ‘galactocentric’ or ‘galactic’

  • annotation (bool) – whether use a milkyway background with annotation

  • rot90 (int) – number of 90 degree rotation

  • grayscale (bool) – whether to use grayscale background

  • r0 (float) – distance to galactic center in kpc

class mw_plot.MWSkyMapBokeh(center=<Quantity [0., 0.] deg>, radius=<Quantity [180., 90.] deg>, grayscale=False)[source]

MWSkyMapBokeh class plotting with Bokeh

Parameters:
  • center (astropy.Quantity) – Coordinates of the center of the plot with astropy degree/radian units

  • radius (astropy.Quantity) – Radius of the plot with astropy degree/radian units

  • grayscale (bool) – whether to use grayscale background

Interactive MilkywWay Bird’s Eye View

1from mw_plot import MWPlotBokeh
2from astropy import units as  u
3from bokeh.io import output_file, show
4
5# setup a mw-plot instance of bird's eye view of the disc
6mw1 = MWPlotBokeh(radius=5 * u.kpc, center=(0, 0)*u.kpc, unit=u.kpc, coord='galactic', grayscale=False, annotation=True)
7# you should use mw1.show(), I do it this way for the docs to compile correctly
8show(mw1.bokeh_fig)

Interactive MilkyWay Sky Map

1from mw_plot import MWSkyMapBokeh
2from astropy import units as  u
3from bokeh.io import output_file, show
4
5# setup a mw-plot instance of the sky
6mw1 = MWSkyMapBokeh()
7# you should use mw1.show(), I do it this way for the docs to compile correctly
8show(mw1.bokeh_fig)