SVG: XML contains duplicated content due to uninitialized axis#4441
Merged
swharden merged 3 commits intoScottPlot:mainfrom Nov 4, 2024
sunefred:4436
Merged
SVG: XML contains duplicated content due to uninitialized axis#4441swharden merged 3 commits intoScottPlot:mainfrom sunefred:4436
swharden merged 3 commits intoScottPlot:mainfrom
sunefred:4436
Conversation
Member
|
Thanks @sunefred, I appreciate you diving down to find the surprisingly nuanced bug underlying this issue! I'll merge this now and it will be in the next release, likely published to NuGet within the next few days or by the end of this weekend at the latest. Thanks again! 🚀 |
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.
Partly fixes #4436
This fixes an issue where an uninitialized axis (such as the
Rightaxis for a defaultPlot) would result in the render counter to max out at five (5) renders. The condition that checks weather an axis has changed or not was updated to correctly handle such an axis where range is[Infinity, -Infinity](reversed).Additionally the equality implementation for
CoordinateRangewas updated. It will now correctly differentiate between[-Infinity, Infinity]and[Infinity, -Infinity].I am sure there are other reasons that multiple render-passes could happen, in which case the SVG output would still contain duplicated content. This PR only fixes the particular issue with uninitialized axis.