Fix subplot -F modifier bugs (+g, +w, +c, +f)#9087
Open
Esteban82 wants to merge 2 commits into
Open
Conversation
Member
Author
|
@Dengda98, could you test 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.
Fixed done with Claude Sonnet 5.
Fixes several issues in gmt subplot begin -F where combining fill, pen, clearance, and layout-fraction modifiers produced incorrect warnings or an incomplete/incorrect canvas fill.
Closes #8744.
Test with:
BUG 1 — "+g behaves strange with +w"
EXPECTED: solid yellow background behind all 4 panels, no visible dividing lines (pen color is "-").
BEFORE THE FIX: the internal
plotcall used to draw the dividing lines painted an opaque white rectangle over the whole canvas first, hiding the yellow fill completely.BUG 2 — "+f must be at the end of -F"
EXPECTED: no warning, correct 3:1 / 1:2 asymmetric layout, divider lines drawn with a 1pt pen.
BEFORE THE FIX: GMT printed "2+w1 not a valid number and may not be decoded properly" and the layout fractions came out wrong, because the +f value-parser did not know where its own argument ended and swallowed the following +w1p into the height-fraction list.
BUG 3 — "+g doesn't have the same effect with and without +c"
EXPECTED: yellow background fill visible everywhere, including the 1cm clearance gaps between/around panels.
BEFORE THE FIX: the internal
plotcall used to reset the origin after applying the clearance also painted an opaque white rectangle over the canvas first, hiding the yellow fill - same root cause as Bug 1, but triggered by +c instead of +w.