My code currently calls in spectral types through Vizier Query, and plots them on a Mollweide projection. I’m trying to overplot all seven spectral types onto one image, but they all come up seperately. Any help on putting them all on one plot?
My current code:
sptypes = {'O*':'b','B*':'g','A*':'r','F*':'c','G*':'m','K*':'y','M*':'w'}
for sptype in sptypes.keys():
Vizier.ROW_LIMIT = -1
V_O = Vizier.query_constraints(catalog='I/131A', SpType=sptype)
tbl = V_O[0]
#print(tbl.colnames)
tbl = tbl[tbl['SpType'] != '']
#print(tbl['_RA.icrs'][:4])
#print(tbl['_DE.icrs'][:4])
coords = SkyCoord(tbl['_RA.icrs'], tbl['_DE.icrs'],
unit=(u.hourangle, u.degree),
frame='icrs')
fig, ax = plt.subplots(1, 1, figsize=(10, 6),
subplot_kw=dict(projection='aitoff'))
ax.scatter(coords.ra.wrap_at(180*u.deg).radian,
coords.dec.radian,
alpha=0.5, s=4, )
plt.title("SAO Stars")
plt.grid(True)
plt.show()