'Why is ax.set_rgrids set angle not working?
I would like to move the distance axis to the left and show ylabels out of the polar chart. I searched and found the ax.set_rgrids method however it seems does not work, here is my code.
plt.rcParams["font.size"] = 9
fig = plt.figure(figsize=(7, 10), dpi=100)
ax1 = fig.add_subplot(projection="polar")
ax1.patch.set_facecolor("lightgrey")
ax1.set_xlim(0.52359878, -0.733038286)
ax1.set_theta_zero_location("S", offset=-180)
ax1.set_theta_direction(-1)
ax1.set_ylim(0, 500)
ax1.yaxis.set_minor_locator(MultipleLocator(100))
ax1.set_rgrids(np.arange(0, 600, 100), labels=[0, 100, 200, 300, 400, 500], angle = -40)
plot1 = ax1.pcolormesh(theta1, r, v1, vmin=-4, vmax=4, cmap="bwr" )
cbar1 = fig.colorbar(plot1, shrink=0.5, extend="both")
cbar1.ax.set_title("[m/s]\n")
ax1.text(8*np.pi/18, 500, "distance\n[m]", horizontalalignment='center')
ax1.text(-0.01*np.pi/40, 550,"azimuth [deg]")
ax1.grid(which="both")
ax1.set_title(f"{time1.year:04d}/{time1.month:02d}/{time1.day:02d} {time1.hour:02d}:{time1.minute:02d}:{time1.second:02d} PPI scan", x=0.6, y=1.1)
plt.show()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

