问题
Description
Is there a method available (or under consideration) to orient the lat lon gridline labels parallel to the gridlines as they intersect the plot boundary? Something like the labels seen in this plot. There seems to be an automated logic in place for orienting gridline labels as follows:
Cartopy version
0.18.0b1
Code
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
rotated_crs = ccrs.RotatedPole(pole_longitude=120.0, pole_latitude=70.0)
ax = plt.axes(projection=rotated_crs)
ax.set_extent((-6, 3, 48, 58), crs=ccrs.PlateCarree())
ax.coastlines(resolution='50m')
gl = ax.gridlines(draw_labels=True,x_inline=False, y_inline=False)
plt.show()
Result
See resulting plot here.
Notice the inconsistent orientation of gridline labels, which can get somewhat messy. It is possible to disable the automated orientation feature with gl.rotate_labels = False
, however, I can't seem to find a method to align the label angle so that the text is parallel to the gridline as it intersects the plot boundary. See plot linked under the description.
Additional Information
I think this issue was discussed here, but doesn't seem to have been addressed further.
来源:https://stackoverflow.com/questions/61786344/how-to-set-curvilinear-lat-lon-gridline-labels-parallel-to-gridlines-with-cartop