DM-55379: Display WCS axes#22
Open
timj wants to merge 4 commits into
Open
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The matplotlib backend now draws all axis furniture (border, ticks, labels, and optionally the full curvilinear grid) in sky coordinates using starlink-pyast when the displayed data have a WCS. The SkyWcs is converted to a pyast FrameSet via AST native serialization, so the transform is exact with no FITS approximation. New Display kwargs: useWcsAxes (default True), wcsGrid, and astPlotOptions for arbitrary AST Plot attribute settings. Labels honour useSexagesimal and update live; the axes redraw on zoom and pan and survive erase. Also fixes _erase, which raised AttributeError on matplotlib >= 3.7. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Interactive panning and zooming update the axis limits on every mouse-motion event, and rebuilding the AST axes twice per event (~50 ms per rebuild) made navigation unusable in notebooks. Limit changes now restart a one-shot 200 ms timer and the rebuild happens once the view settles. The existing artists are drawn in data coordinates so they track the view during the drag. Backends without a running event loop cannot fire timers, so there the redraw remains immediate. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AST colours are 1-based indices into the grf colour table, not colour names; the documented example never worked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or 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
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.
No description provided.