I've got the following code that generates a surface density plot. x and y are position co=ordinates and z axis represents the density. All the values are pre calculated and is stored in a numpy array.
#set up the grid
xi, yi = np.linspace(x.min(), x.max(), 200), np.linspace(y.min(), y.max(), 200)
xi, yi = np.meshgrid(xi, yi)
#interpolate
rbf = scipy.interpolate.Rbf(x, y, z, function='linear')
zi = rbf(xi, yi)
plt.imshow(zi, vmin=z.min(), vmax=z.max(), origin='lower', extent=[x.min(), x.max(), y.min(), y.max()])
plt.scatter(x, y, c=z,marker='o')
plt.colorbar()
plt.scatter(xo,yo, c='b', marker='*')
plt.xlabel("RA(degrees)")
plt.ylabel("DEC(degrees)")
plt.title('Surface Density Plot 2.0 < z < 2.2')
plt.savefig('2.0-2.2.png', dpi= 300 )
plt.show()
The problem I have is the xaxis ticks are not in user friendly terms, they are values between 150-152 but I can't seem to change the ticks positions using the xticks() function. Would anyone have a suggestion how I can go about to formatting the x axis?
edit- These are the values for xyz used for the plot. x,y,z are three numpy arrays- https://www.dropbox.com/s/l03pkzplqmfm1su/xyz.csv the first row is x values, second the y and third the z.