Always show whole label labels on wcs axes
I am reading data from FITS file and plotting a velocity field. I use set_major_formatter('dd:mm')
for y-axis angle but for every other tick it only shows minutes. I want full degrees and minutes to be displayed for each placemark.
fig = plt.figure(dpi=300)
plt.set_cmap('gray')
ax = plt.subplot(111, projection=wcs)
im = ax.imshow(mean_vel, vmin=-115, vmax=-102, origin='lower') # plot data
dec = ax.coords[1]
dec.set_major_formatter('dd:mm')
dec.set_ticks([29.5, 30, 30.5, 31, 31.5, 32, 32.5, 33] *u.deg)
dec.set_ticklabel(size=6)
For example, 00'
the y-axis should display as 32Β°00'
instead of
+3
source to share
No one has answered this question yet
Check out similar questions: