Skip to content

plotting multiple graphs #39

Answered by Blake-Madden
matiashr asked this question in Q&A
Discussion options

You must be logged in to vote

If you go into "data/pivot.h", there is a Pivot object that you can create. With that, you can call PivotLonger() and pass in the dataset that you have constructed and get back a "long" dataset that you can then use with the line plot.

Pivot pv;
auto newDataset = pv.PivotLonger(myDataset, { L"x" }, { L"y1", L"y2" }, { L"GROUP" }, L"YValues");

At this point, you can pass newDataset to the line plot and specify "X" and "YValues" as the X and Y and "GROUP" as the grouping column. From there, is will create a line for the Y1 values and another line for the Y2 values.

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@matiashr
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@matiashr
Comment options

Answer selected by Blake-Madden
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants