I would like to plot my data in 3D like this figure(The filled circles are shown in gray scale based on the declination; darker colours mean lower declination.The dots in the R.A.-Dec. plane are the projection on the celestial plane)
I plot like this but I am not able to get like the given figure given above
import numpy as np, math
import matplotlib.pyplot as plt
from astropy.table import Table
from mpl_toolkits.mplot3d import Axes3D
data=Table.read('test_data.fits')
min_red=min(data['redshift'])
fig = plt.figure(figsize=(16,14))
ax = Axes3D(fig)
ax = fig.gca(projection='3d')
ax.view_init(10,30)
ax.plot(data['ra'], data['dec'], data['redshift'],'ko',markersize=5,linewidth=2)
m=ax.plot(data['ra'], data['dec'], 'ro', markersize=1, color='r', zdir='z', zs=min_red)
ax.set_xlabel('ra')
ax.set_ylabel('dec')
ax.set_zlabel('redshift')
plt.show()
But I got like this figure(the dots in Ra and Dec are the projection on the celestial plane)
How to plot like the first figure. Kindly do help