!ls # the files in the github repository are import numpy as np import matplotlib.pyplot as plt %matplotlib inline data = [line.split(',') for line in open('MyTable_rahul.poruri.csv')] # a .csv file has values or columns seperated by commas # the data format in the .csv file print data[0] print data[1] #ra = np.zeros(len(data)) #dec = np.zeros(len(data)) ra, dec = [], [] for i in range(1,len(data)): temp = float(data[i][2]) temp1 = float(data[i][3]) ra.append(temp) dec.append(temp1) #ra[i] = float(temp) #dec[i] = float(temp1) ra = np.asarray(ra) dec = np.asarray(dec) ra = (ra-180)*(np.pi/180) dec = dec*(np.pi/180) ra is from -np.pi to np.pi and dec is from -np.pi/2 to np.pi/2 plt.subplot(111,projection='aitoff') # aitoff, mollweide and hammer are 3 of the options plt.grid(True) plt.scatter(ra,dec,s=5) plt.title('Quasars from the SDSS DR10') plt.xlabel('ra') plt.ylabel('dec') #ra = np.zeros(len(data)) #dec = np.zeros(len(data)) l, b = [], [] for i in range(1,len(data)): temp = float(data[i][4]) temp1 = float(data[i][5]) l.append(temp) b.append(temp1) #ra[i] = float(temp) #dec[i] = float(temp1) b = np.asarray(b) l = np.asarray(l) l = (l-180)*(np.pi/180) b = b*(np.pi/180) plt.subplot(111,projection='aitoff') plt.grid(True) plt.scatter(l,b,s=5) plt.title('Quasars from the SDSS DR10') plt.xlabel('galactic longitude') plt.ylabel('galactic latitude')