Capture plot parameters in plot-frame and plot3d-frame#45
Merged
bennn merged 1 commit intoracket:masterfrom Aug 21, 2018
Merged
Capture plot parameters in plot-frame and plot3d-frame#45bennn merged 1 commit intoracket:masterfrom
bennn merged 1 commit intoracket:masterfrom
Conversation
`plot-frame` and `plot3d-frame` delays the creation of the plot snip object until the size of the canvas is known. This means that the snip creation code is executed outside any `parameterize` scope and the values of any plot parameters (like `plot-decorations?`) would be ignored unless they are saved using `plot-parameters` and restored using `parameterize/group`
Collaborator
Author
|
Hi @bennn , can you please review this pull request or ask someone else in the Racket dev team to review it? This fixes a bug in the plot package were all plot parameters are ignored when either Thanks, |
bennn
approved these changes
Aug 21, 2018
bennn
added a commit
that referenced
this pull request
Aug 21, 2018
these tests are from the pull request: <#45>
bennn
added a commit
that referenced
this pull request
Aug 21, 2018
(so DrDr doesn't hang waiting for the user to quit manually!)
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.
plot-frameandplot3d-framedelays the creation of the plot snip object until the size of the canvas is known. This means that the snip creation code is executed outside anyparameterizescope and the values of any plot parameters (likeplot-decorations?) would be ignored unless they are saved usingplot-parametersand restored usingparameterize/groupThe fix is based on a problem reported here: https://groups.google.com/forum/#!topic/racket-users/ta-245wAYco
The issue was introduced when #39 was fixed, since at that time the plot snip was no longer created withing the scope of the
parameterizecall.Here is some example code to test this (previously the two plots would have decorations, even though
plot-decorations?is `#f):