In [1]:
% matplotlib inline
import matplotlib.pyplot as plt
In [2]:
def LG_Schematic():
iso = plt.Circle((7.5,5), radius=5, fill=False)
mw = plt.Circle((5,5), radius=.2, fill=True)
m31 = plt.Circle((10,5), radius=.2, fill=True, color='r')
mid = plt.Circle((7.5,5), radius=.1, fill=True, color='k')
D_iso = plt.Arrow(7.5,5,0,-5, width=.2, color='k')
lmc = plt.Circle((4,7), radius=.1, fill=True)
m33 = plt.Circle((11,6), radius=.1, fill=True, color='r')
D_lmc = plt.Arrow(5,5,-1,2, width=.2, color='k')
D_m33 = plt.Arrow(10,5,1,1, width=.2, color='k')
D_pair = plt.Arrow(5,5,5,0, width=.2, color='k')
fig=plt.figure(figsize=(20,10))
ax = plt.gca(frameon=False)
ax.get_xaxis().set_visible(False)
ax.get_yaxis().set_visible(False)
ax.set_aspect('equal')
ax.cla() # clear things for fresh plot
# change default range so that new circles will work
ax.set_xlim((0,15))
ax.set_ylim((0,15))
ax.text(4.5,4.1,"$MW$", fontsize=16)
ax.text(3.75,7.2,"$LMC$", fontsize=16)
ax.text(9.5,4.1,"$M31$", fontsize=16)
ax.text(10.75,6.25,"$M33$", fontsize=16)
ax.text(7.8,2.1,"$D_{iso}$", fontsize=16)
ax.text(4.5,6.0,"$D_{LMC}$", fontsize=16)
ax.text(10.5,5.25,"$D_{M33}$", fontsize=16)
ax.text(6.25,5.25,"$D_{Pair}$", fontsize=16)
fig.gca().add_artist(iso)
fig.gca().add_artist(mw)
fig.gca().add_artist(lmc)
fig.gca().add_artist(m31)
fig.gca().add_artist(m33)
fig.gca().add_artist(mid)
fig.gca().add_artist(D_iso)
fig.gca().add_artist(D_lmc)
fig.gca().add_artist(D_m33)
fig.gca().add_artist(D_pair)
return fig
def Equatorial_Schematic():
fig=plt.figure(figsize=(20,10))
ax = plt.gca(frameon=False)
ax.get_xaxis().set_visible(False)
ax.get_yaxis().set_visible(False)
ax.set_aspect('equal')
ax.cla() # clear things for fresh plot
ax.set_xlim((-10,10))
ax.set_ylim((-10,10))
Zaxis = plt.Arrow(0,0,0,10, width=.2, color='k')
Yaxis = plt.Arrow(0,0,10,0, width=.2, color='k')
Xaxis = plt.Arrow(0,0,-3,-7, width=.2, color='k')
DEC = matplotlib.patches.Arc([0,0],width=3, height=3, theta1=-30, theta2=45)
RA = matplotlib.patches.Arc([0,0],width=5, height=5, theta1=-114, theta2=-30)
muDelta = plt.Arrow(7,7,-1.3,2, width=.2, color='k')
muAlpha = plt.Arrow(7,7,1.3,1.5, width=.2, color='k')
plot([7,7],[7,-4],'k--')
plot([0,7],[0,-4],'k--')
plot([0,7],[0,7],'k--')
scatter(7,7, marker='*', s=150)
ax.text(-3.5,-6,"$X$", fontsize=16)
ax.text(9,.5,"$Y$", fontsize=16)
ax.text(-.75,9,"$Z$", fontsize=16)
ax.text(0.5,-3,"$\\alpha$", fontsize=20)
ax.text(1.5,0.5,"$\\delta$", fontsize=20)
ax.text(6,9,"$v_{\\delta}$", fontsize=20)
ax.text(8,7.6,"$v_{\\alpha*}$", fontsize=20)
# ax.text(6,9,"$\\mu_{\\delta}$", fontsize=20)
# ax.text(8,7.6,"$\\mu_{\\alpha*}$", fontsize=20)
fig.gca().add_artist(Zaxis)
fig.gca().add_artist(Yaxis)
fig.gca().add_artist(Xaxis)
fig.gca().add_artist(DEC)
fig.gca().add_artist(RA)
fig.gca().add_artist(muDelta)
fig.gca().add_artist(muAlpha)
return fig
def Heliocentric_Schematic():
fig=plt.figure(figsize=(20,10))
ax = plt.gca(frameon=False)
ax.get_xaxis().set_visible(False)
ax.get_yaxis().set_visible(False)
ax.set_aspect('equal')
ax.cla() # clear things for fresh plot
ax.set_xlim((-10,10))
ax.set_ylim((-10,10))
Zaxis = plt.Arrow(0,0,0,10, width=.2, color='k')
Yaxis = plt.Arrow(0,0,10,0, width=.2, color='k')
Xaxis = plt.Arrow(0,0,-3,-7, width=.2, color='k')
DEC = matplotlib.patches.Arc([0,0],width=3, height=3, theta1=-30, theta2=45)
RA = matplotlib.patches.Arc([0,0],width=5, height=5, theta1=-114, theta2=-30)
muDelta = plt.Arrow(7,7,-1.3,2, width=.2, color='r')
muAlpha = plt.Arrow(7,7,1.3,1.5, width=.2, color='r')
Vsys = plt.Arrow(0,0,3,3, width=.2, color='r')
plot([7,7],[7,-4],'k--')
plot([0,7],[0,-4],'k--')
plot([0,7],[0,7],'k--')
scatter(7,7, marker='*', s=150)
ax.text(-3.5,-6,"$X$", fontsize=16)
ax.text(9,.5,"$Y$", fontsize=16)
ax.text(-.75,9,"$Z$", fontsize=16)
ax.text(0.5,-3,"$l$", fontsize=20)
ax.text(1.5,0.5,"$b$", fontsize=20)
ax.text(6,9,"$\hat{v}_{b}$", fontsize=20)
ax.text(8,7.6,"$\hat{v}_{l*}$", fontsize=20)
# ax.text(6,9,"$\hat{\\mu}_{b}$", fontsize=20)
# ax.text(8,7.6,"$\hat{\\mu}_{l*}$", fontsize=20)
ax.text(1.5,3, "$\hat{v}_{sys}$", fontsize=20)
fig.gca().add_artist(Zaxis)
fig.gca().add_artist(Yaxis)
fig.gca().add_artist(Xaxis)
fig.gca().add_artist(DEC)
fig.gca().add_artist(RA)
fig.gca().add_artist(muDelta)
fig.gca().add_artist(muAlpha)
fig.gca().add_artist(Vsys)
return fig
In [6]:
f = LG_Schematic()
#f.savefig("/afs/slac.stanford.edu/u/ki/mwillia1/Thesis/LocalGroupHaloProps/doc/paper/figures/iso_diagram.pdf", dpi=1200, bbox_inches='tight')
In [3]:
f=Equatorial_Schematic()
f.savefig("/afs/slac.stanford.edu/u/ki/mwillia1/Thesis/LocalGroupHaloProps/doc/paper/figures/eq_sys.pdf", dpi=1200, bbox_inches='tight')
In [4]:
f=Heliocentric_Schematic()
f.savefig("/afs/slac.stanford.edu/u/ki/mwillia1/Thesis/LocalGroupHaloProps/doc/paper/figures/hel_sys.pdf", dpi=1200, bbox_inches='tight')
In [ ]: