I am trying to plot the galactic coordinates using python. Say I have this data:
data = [(0.261, -7.123, 13.03, 'Unidentified'), (-0.326, 77, 13.03, 'Galaxies')]
Where each tuple has the form (ra, dec, flux, type).
I will be asked to use astropy + matplotlib, therefore:
c = SkyCoord(ra = ra*u.degree, dec = dec*u.degree) galactic = c.galactic
This is where my problem arises, I use this code:
from mpl_toolkits.basemap import Basemap import numpy as np import matplotlib.pyplot as plt
However, I cannot build data in galactic coordinates, and I do not know why. I also need each dot to have a different color depending on the type and different size depending on the value of the stream. I need to achieve something like this (I'm a little new to python, and I have never used astropy, I have not found good examples):

Hope someone can help.
source share