Skip to content

Conversation

greglucas
Copy link
Contributor

Fixes #1383

Rationale

The previous gridliners were called xbottom_labels and have been renamed bottom_labels, this is adding in a deprecation to allow the old versions to still be used, but warning on it.

Also updated the gridliner example to use the new attributes.

Implications

@greglucas greglucas added this to the 0.18 milestone Apr 4, 2020
@QuLogic
Copy link
Member

QuLogic commented Apr 10, 2020

Travis ran and failed, I don't know why it didn't post. https://travis-ci.org/github/SciTools/cartopy/builds/671037232

@QuLogic
Copy link
Member

QuLogic commented Apr 10, 2020

These were changed in 2f5e568, which I mostly reverted (x&y are the directions of the CRS, not necessarily lat/lon). Maybe we should revert these attribute name changes as well?

On the other hand, since gridlines now do bounding box intersections, it's not really guaranteed that x or y will hit just top/bottom or left/right. I'm not sure if we should warn more explicitly about it in the other setters.

@greglucas
Copy link
Contributor Author

I agree, projected coordinates/axes will make this much more confusing with what do x/y and left/right mean?

MPL uses ytick.right and ytick.labelright:
https://matplotlib.org/3.1.0/gallery/ticks_and_spines/tick_label_right.html

I personally think that ylabel_left (the older style) is actually doubly declaring the axes, i.e. can I don't think xlabel_left is even an option there. So, it is probably cleaner to just put label_left in there, rather than with the x/y qualifier.

I'm not tied to any particular attribute names, but think they should be consistent throughout the docs.

@QuLogic
Copy link
Member

QuLogic commented Apr 11, 2020

I think these names might be okay, but can you add the warning on the getter as well?

@greglucas
Copy link
Contributor Author

Sure, added that now.

@QuLogic QuLogic merged commit ccf4c3b into SciTools:master Apr 11, 2020
@QuLogic
Copy link
Member

QuLogic commented Apr 12, 2020

Actually, looking at #1475, I think we might have too few options, but I'm not sure how best to specify things. On the one plot that is almost-rectangular, there is one latitude label that appears on the left side. So theoretically, we should have left/right/top/bottom options for x & y, but on the other hand we have some projections that don't really have defined sides.

@greglucas greglucas deleted the deprecate_gridliner_labels branch July 23, 2020 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hiding part of gridline labels
3 participants