Create Frameless(false) overload to undo Frameless() behavior#4856
Merged
swharden merged 6 commits intoScottPlot:mainfrom Mar 22, 2025
manaruto:restore-frameless-operation
Merged
Create Frameless(false) overload to undo Frameless() behavior#4856swharden merged 6 commits intoScottPlot:mainfrom manaruto:restore-frameless-operation
Frameless(false) overload to undo Frameless() behavior#4856swharden merged 6 commits intoScottPlot:mainfrom
manaruto:restore-frameless-operation
Conversation
…less mode in AxisManager Implemented RestoreFrameless(bool showTitle = true), which makes all X and Y axes visible.
…ger to restore axes visibility -Added RestoreFrameless(), which calls AxisManager.RestoreFrameless(). -Ensures users can revert the frameless mode from LayoutManager.
…xes and grid visibility
Member
|
Hi @manaruto, thank you so much for this pull request! This is one of the most beautiful and descriptive pull requests I have every seen ✨ Thank you for your great work! 🚀 I'm going to refine this a bit, changing the API slightly, and extending the cookbook to improve how these strategies are documented. I'll merge this in today and make a new release this weekend, so these changes will go live soon. Thanks again! |
Resolves #4804
Frameless(false) overload to undo Frameless() behavior
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.
This pull request introduces a new method, RestoreFrameless, to the AxisManager class. Its purpose is to revert the frameless state by restoring the visibility of the axes and title. Additionally, corresponding changes have been made in the LayoutManager and Plot classes to expose this functionality at higher levels.
Changes Made
AxisManager.cs
Added RestoreFrameless(bool showTitle = true) Method:
This new method sets all X and Y axes’ IsVisible property to true, effectively reverting the state applied by Frameless(). The title's visibility is controlled by an optional parameter.
LayoutManager.cs
Added RestoreFrameless() Method:
This method calls the new RestoreFrameless on the plot’s axes. This ensures that users who applied a frameless layout via the LayoutManager can now revert the change.
Plot.cs
Added ShowAxesAndGrid(bool showTitle = true) Helper Method:
This method reverses the frameless state by calling RestoreFrameless on the AxisManager and then re-enables grid visibility.
Example to undo the frameless operation:
restore-frameless.mp4