import pylab as plt
from mw_plot import MWPlot
from astropy import units as  u

# setup a mw-plot instance of bird's eyes view of the disc
mw1 = MWPlot(radius=20 * u.kpc, center=(0, 0)*u.kpc, unit=u.kpc, coord='galactocentric', rot90=2, grayscale=False, annotation=False)

# setup subplots with matplotlib
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(15, 7.5))

# transform the whole figure with mw-plot
# mw1.transform(fig) will have the same effect
mw1.transform([ax1, ax2])

# you can plot something on top of the transformed subplot
ax2.scatter(8, 0, c='r', s=100)

# plot something in the first subplot
ax1.plot([20, -20], [20, -20])
ax1.plot([20, -20], [-20, 20])
plt.tight_layout()