Skip to content
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

Use UTF8 degree symbol directly #1885

Merged
merged 1 commit into from
Sep 23, 2021
Merged

Use UTF8 degree symbol directly #1885

merged 1 commit into from
Sep 23, 2021

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Sep 22, 2021

Rationale

With Python 3, all source files are UTF8, so there's no need for a Unicode escape to encode the degree symbol.

Implications

Docs are a tiny bit clearer.

@QuLogic QuLogic added this to the 0.21 milestone Sep 22, 2021
@@ -22,7 +22,7 @@ class _PlateCarreeFormatter(Formatter):

_target_projection = ccrs.PlateCarree()

def __init__(self, direction_label=True, degree_symbol='\u00B0',
def __init__(self, direction_label=True, degree_symbol='°',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, maybe we should use real prime glyphs for minutes and seconds.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would make sense to change those to the proper symbols, but that may require some updates to images too so perhaps you want to save that for another PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fortunately appears that we don't need to update anything.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fortunately, or unfortunately... This could be because our tolerances are so large like you found in your last PR :)
Feel free to self-merge if you like this as-is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, yes, but I don't think any tests have ticks smaller than degrees. Fortunately, they are checked text-wise in test_ticker.py.

With Python 3, all source files are UTF8, so there's no need for a
Unicode escape to encode the degree symbol.
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.

2 participants