Interactive Single Plot

You can use the bokeh backend to plot the Milky Way in an interactive way. Here are examples from each of the two classes.

Interactive MilkywWay Bird’s Eye View

from mw_plot import MWFaceOnBokeh
from astropy import units as u
from bokeh.io import output_file, show

# setup a mw-plot instance of bird's eye view of the disc
mw1 = MWFaceOnBokeh(annotation=True)
# you should use mw1.show(), I do it this way for the docs to compile correctly
show(mw1.bokeh_fig)

Interactive MilkyWay Sky Map

from mw_plot import MWSkyMapBokeh
from astropy import units as  u
from bokeh.io import output_file, show

# setup a mw-plot instance of the sky
mw1 = MWSkyMapBokeh()
# you should use mw1.show(), I do it this way for the docs to compile correctly
show(mw1.bokeh_fig)

Class API

class mw_plot.MWFaceOnBokeh(center=<Quantity [8.125, 0.   ] kpc>, radius=<Quantity 27.82407649 kpc>, unit=Unit("kpc"), coord='galactic', annotation=True, grayscale=False, r0=8.125)[source]

MWPlot Brokeh class plotting with Bokeh

Parameters:
  • 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

  • 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