Emit only valid Graphics options from Plot - #1553
Merged
Merged
Conversation
* Only pass valid Graphics on from Plot to the resulting Graphics * Add (non-standard) LogPlot to list of valid Graphics options
Member
|
LGTM |
Merged
bdlucas1
added a commit
that referenced
this pull request
Dec 24, 2025
Issue #1554 PR #1553 restricted options passed from Plot to Graphics to only include valid Graphics options in order make the tests more robust. This required adding LogPlot to the list of allowable Graphics options, with a default of False. So now all Graphics objects have a LogPlot option, most with a value of False, whereas previously only log plots generated a LogPlot option in Graphics, with a value of True. However the SVG generation code in builtin/box/graphics.py did not check the value of the LogPlot option when deciding whether to generate log axes.
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.
Currently Plot passes all options on to the generated Graphics object. This makes the tests more fragile than necessary because these options, not being valid Graphics options, are no-ops, and this is a bit of an impediment to refactoring.
I verified through my end-to-end tests in that render all the doctests (and more) using m3d and compare the resulting image to an expected image that there are no changes in the generated images, confirming that the options that were being passed are no-ops.