-
Notifications
You must be signed in to change notification settings - Fork 5
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
Overhaul internals to remove "axis artist" usage and improve flexibility (new version 2.0!) #68
Open
erykoff
wants to merge
50
commits into
main
Choose a base branch
from
2.0beta
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
Creating the transformer object turned out to be the major bottleneck, and caching this speeds up repeated transformations 60x.
This allows simpler calls, and will always do Plate Carree to/from the desired transformation because that's the only operation that is useful to skyproj.
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.
This PR has a complete overhaul of the internals of skyproj.
The matplotlib AxisArtist code was brittle and would change randomly from sub-version to sub-version. This overhaul removes use of the AxisArtist and move the required functionality into the
SkyAxes
class which makes editing the formatting of plots a lot more flexible. Furthermore, interactivity works again on matplotlib 3.9!The projection code was also simplified to use better caching, and to remove unneeded complexity that allowed transformation from any two coordinate reference systems, but this was never used because we only go from lon/lat to/from a CRS.
The tick labeling has also been simplified internally because we no longer have to work around AxisArtist limitations.
The test plots have all been updated because positions of labels and ticks have moved slightly with the new internals. All the plots look as good or better than the previous versions to my eye. The labeling on arbitrary Albers maps is still a little wonky, but it was wonky before.