-
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
Addition of new functionalities for formatting the Cartopy.gridliner ticklabels #1699
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…onalities here provided. The prior developers branch had several commits which were aggregated into this single 1st commit. Add a warning and comments This is the commit that antecedes all added new commits in respect to the pull request number SciTools#1693 from: SciTools#1693
… setting the number of ticks, and changing the decimal separators in the ticklabels
…ER. Now, the user can directly change the hemispheres (north-south and west-east) ticklabels ('N', 'S', 'W', 'E') from the gridliner instance. Also, new functionalities have been added to the gridliner
… been changed to be conform with flake8
…for the scalebar has been added
…calebar has been updated. Now, the fancy_scalebar has a proper documentation. Also, the geoaxes can directly create a scalebar
…ht added, following the cartopy contributors' standard'
…ive examples and tests. \n The changes here applied allow an easy assess and respective setting of the geoaxes.griline's ticklabels. The settings that can now be changed by the user are the following: \n a) the decimal separator (from dot '.' to any other string (i.e. from dot to comma ','); \n b) the number of decimal places after the coordinate (i.e.: {0:3f}); \n c) the labels of the east-west hemispheres ('W', 'E') - to any other set of labels (i.e.: 'Oeste', 'Leste'); \n d) the labels of the north-south hemispheres ('N', 'S') - to any other set of labels (i.e.: 'Norte', 'Sul'>.
…s of the gridliner module and submodules
…for better follow up. Furthermore, the new figure tests have the ImageTesting decorator in its functions.
Dear all, I am wondering when one should close a Pull Request. In this case, given this pull request (PR) changes, the discussed issue is formally solved. Nevertheless, if this PR is not merged into the main branch of cartopy (i.e.: in the next cartopy's release), the issue will remain present. I thank you for your time, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear all,
I would like to make a pull request in cartopy in order to add a new set of functionalities for cartopy's gridline.
The new functionalities encompass small functions that allow any given user to easily format the gridline ticklabel settings (i.e.: decimal separator symbol, hemisphere symbology, etc.).
Rationale
These new assets have been derived from my personal struggle with cartopy's geoaxes and the continuous migration from the past basemap towards cartopy.
In this new branch, the geoaxes class has gained new assets for ticklabel formatting.
This background of this pull request is presented in a comment from the stackoverflow (see here). At the current time, cartopy only supports a fixed set of geographical units for the xticklabels and yticklabels (i.e.: "W" for west coordinates, "E" for east coordinates, "S" for south coordinates, "N" for north coordinates), with no easy way to change them to a user's defined version. Also, there is no easy way to convert the decimal symbol of the coordinates (i.e.: dot "."). For users like me who come from Latin countries, there is a great demand for latin symbols, therefore, instead of using [W,E,S,N and dot"."], one should use the following respectively [O, L, S, N and ","].
Here is a relation of the provided symbols:
O (from Oeste) == West
L (from Leste) == East
N (from Norte) == North
S (from Sul) == South
'.' == ','
I state here that all prior symbols [W,E,S,N and dot"."] have been kept as they were (in international format). Therefore, no changes have been made to the common cartopy's gridline usage. This new Pull request only allows the user to easily change those symbols into any user's defined string/symbol.
---------------------------------------------------------------------------------------------------------------
The list of the new functionalities related to gridline ticklabel settings:
Observation:
This is a subdivision of the prior pull request #1693.
In accordance to GregLucas, the former pull request was subdivided into small ones, being this respective pull request solely regarding the gridline ticklabel settings
Check pull request #1698 for the scalebar asset.
Usage example:
Implications
None