Rename the figure= kwarg of TiledDataset.plot to fig= - #747
Open
sr-dash wants to merge 4 commits into
Open
Conversation
NDCube.plot uses fig= for the figure to draw into, while TiledDataset.plot used figure=. Rename it to fig= for consistency and deprecate figure= so existing code keeps working for now. Closes DKISTDC#593
Member
|
Hi! Thanks for the PR, I think it'd be good to change |
SolarDrew
reviewed
Aug 21, 2026
SolarDrew
left a comment
Contributor
There was a problem hiding this comment.
I agree, I'd like to have consistency with the Inversion and Profiles classes as well. Otherwise this looks good, thanks for fixing it.
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.
Fixes #593.
TiledDataset.plot()took the figure to draw into asfigure=, whileNDCube.plot()(and thereforeDataset.plot()for >2D data) takes it asfig=. This renames theTiledDataset.plot()keyword tofigand deprecatesfigurewithastropy.utils.decorators.deprecated_renamed_argument, so existing code carries on working (with aDKISTDeprecationWarning) until the deprecation period is up.The parameter keeps its position in the signature, so anyone passing it positionally is unaffected.
docs/tutorial/7_visualization.md) and the VBI extents example.fig=returns the figure it was given, and one thatfigure=still works but warns.I set the deprecation version to
1.19on the assumption that's the next release — happy to change it.Two things I wasn't sure about and left alone, let me know if you'd like them in this PR:
Inversion.plot()andProfiles.plot()also takefigure=. They're experimental, but renaming them too would keep the whole package consistent.I haven't added a— added aschangelog/entry yet747.removal.rst.