-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Label lat lon gridlines parallel to intersection angle at plot boundary #1560
Comments
@dopplershift I believe that the behavior @friedrichknuth proposes here should be the default. It is quite odd to have different angle on the same side of the labels. What do you think? |
This kind of gridline labels look much better!! |
By changing the
This at least makes the orientation of labels in the sample region to be consistent, but not sure how to make the text parallel to the gridline mentioned by @friedrichknuth. If change the map extent to a larger region, for example:
It has an unwanted label Also, I would like to ask if there's a way to label only latitude or longitude on one side, instead of a mixture of both as the case of the right axis in the second figure. |
Regarding @icetianli's question Is there's a way to label only latitude or longitude on one side, instead of a mixture of both as the case of the right axis in the second figure. A possible solution is to modify the axis with different sets of lon/lat gridlines to be labeled.
which produces |
Closed by #1537 |
Description
Enhancement to orient lat lon gridline labels parallel to the gridlines as they intersect the plot boundary. Something like the labels seen here:
[source]
Code
Cartopy version
0.18.0
Result
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, as seen in the plot under the description.Additional Information
I think the logic for this might be here
cartopy/lib/cartopy/mpl/gridliner.py
Line 674 in 47ec03f
This issue was briefly discussed here ##1089 (comment), but unsure if it has been addressed further.
The text was updated successfully, but these errors were encountered: