Skip to content

SP5: Refactor layout system#2843

Merged
swharden merged 15 commits intomainfrom
2023-07-06a
Aug 6, 2023
Merged

SP5: Refactor layout system#2843
swharden merged 15 commits intomainfrom
2023-07-06a

Conversation

@swharden
Copy link
Member

@swharden swharden commented Aug 6, 2023

  • The Plot now has a LayoutEngine that determines the layout of the plot
  • There are several layout engines in ScottPlot.LayoutEngines such as Automatic, Match, Fixed, etc.
  • Users can inject their own layout logic by creating their own class that implements ILayoutEngine
  • This PR also streamlines how multiple plots may share layouts and axis limits, simplifying how to achieve two controls with shared axes
// Make one plot have the same layout as another.
// This only needs to be called once.
formsPlot1.Plot.MatchLayout(formsPlot2.Plot); 
// This needs to be called every time plot 1's axes change
formsPlot1.MatchAxisLimits(formsPlot2.Plot);

@swharden swharden enabled auto-merge August 6, 2023 23:13
@swharden swharden merged commit eee909a into main Aug 6, 2023
@swharden swharden deleted the 2023-07-06a branch August 6, 2023 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SP5: Need a method to match layouts across controls SP5: Need a RenderFinished event

1 participant