Source code for irfpy.cy1orb.plot.axis_moon_gse
import matplotlib.pyplot as plt
import numpy as np
import irfpy.earth.bowshock
import irfpy.earth.magnetosphere
[docs]def axis_moongse(rect=None, xylabel=True, bsfmt='r-', mpfmt='g-', efmt='bo'):
''' Make axes for Moon position plot with bowshock and magnetopause positions.
Here is a sample::
figure()
ax = axis_moongse()
ax.plot([60, 61, 62], [30, 40, 50])
'''
if rect:
ax = plt.axes(rect)
else:
ax = plt.axes()
bs = np.array(irfpy.earth.bowshock.getboundary())
mp = np.array(irfpy.earth.magnetosphere.getboundary())
ax.plot(bs[:, 0], bs[:, 1], bsfmt)
ax.plot(bs[:, 0], -bs[:, 1], bsfmt)
ax.plot(mp[:, 0], mp[:, 1], mpfmt)
ax.plot(mp[:, 0], -mp[:, 1], mpfmt)
ax.plot([0], [0], efmt)
ax.xaxis.set_ticks([-100, -50, 0, 50, 100])
ax.yaxis.set_ticks([-100, -50, 0, 50, 100])
if not xylabel:
plt.setp(ax.get_xticklabels(), visible=False)
plt.setp(ax.get_yticklabels(), visible=False)
ax.set_xlim(-100, 100)
ax.set_ylim(-100, 100)
ax.set_aspect('equal')
return ax