Skip to content

MultiPlot#4344

Merged
swharden merged 3 commits intomainfrom
3948
Oct 16, 2024
Merged

MultiPlot#4344
swharden merged 3 commits intomainfrom
3948

Conversation

@swharden
Copy link
Member

This PR adds a simple Multiplot class for creating figures containing multiple Plot objects. Refinements to the API will be made in subsequent PRs.

This is only useful for saving image files. This type of plot is not supported in the user controls. To achieve this type of functionality in an interactive app, place multiple controls on the window.

Plot plot1 = new();
var sig1 = plot1.Add.Signal(Generate.Sin());
sig1.Color = Colors.Blue;
sig1.LineWidth = 5;

Plot plot2 = new();
var sig2 = plot2.Add.Signal(Generate.Cos());
sig2.Color = Colors.Red;
sig2.LineWidth = 5;

MultiPlot mp = new();
mp.AddSubplot(plot1, 0, 2, 0, 1);
mp.AddSubplot(plot2, 1, 2, 0, 1);
mp.SavePng("test.png");

image

implement basic functionality to resolve #3948

additional refinements are required to improve the API
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.

Multiplot: create new simpler strategy for saving single images with multiple plots

1 participant