- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Create Curve Plots with Overall Average Curve and Individual Replicate Curves
Hi all,
I'm wanting to use Graph Builder to create a graph like this (copied from the Fit Curve dissolution model free comparison report)
I cannot seem to do this in graph builder. Any suggestions?
The graph needs to show each curve (specified as CurveID in the data table).
The graph needs to show the average curve by group (Curve Group).
The error bars are not necessary, but would be nice to have.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Create Curve Plots with Overall Average Curve and Individual Replicate Curves
I got it. I split the data based on Curve Group so Y A and Y B are their own columns. Then put them both on Y. I added line element twice and use CurveID as Overlay. For one of the lines I removed the Overlay Variable to get the mean for A and B. The rest was manipulating thickness and colors of lines via legend and Customize.
I attached split table.
Data Scientist, Life Sciences - Global Technical Enablement
JMP Statistical Discovery, LLC. - Denver, CO
Tel: +1-919-531-9927 ▪ Mobile: +1-303-378-7419 ▪ E-mail: chris.kirchberg@jmp.com
www.jmp.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Create Curve Plots with Overall Average Curve and Individual Replicate Curves
note, X should be continuous, I accidentally have it as nominal in the attached table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Create Curve Plots with Overall Average Curve and Individual Replicate Curves
is the best I can get, so far.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Create Curve Plots with Overall Average Curve and Individual Replicate Curves
Have you tried adding line element a second time and then manipulating the variables like so:
Data Scientist, Life Sciences - Global Technical Enablement
JMP Statistical Discovery, LLC. - Denver, CO
Tel: +1-919-531-9927 ▪ Mobile: +1-303-378-7419 ▪ E-mail: chris.kirchberg@jmp.com
www.jmp.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Create Curve Plots with Overall Average Curve and Individual Replicate Curves
That's closer, but still cannot overlay the two curve groups.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Create Curve Plots with Overall Average Curve and Individual Replicate Curves
Taking it one step further and manipulating graph colors and transparencies:
using JMP 18.1.2 and here is the script to recreate
Graph Builder(
Size( 929, 685 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X( :X ),
Y( :Y ),
Group X( :Curve Group ),
Overlay( :CurveID ),
Color( :Curve Group )
),
Elements(
Points( X, Y, Legend( 11 ) ),
Line( X, Y, Legend( 13 ) ),
Line(
X,
Y,
Overlay( 0 ),
Legend( 16 ),
Error Interval( "Standard Deviation" )
)
),
SendToReport(
Dispatch( {}, "400", ScaleBox,
{Legend Model(
11,
Properties( 2, {Marker( "Dot" )}, Item ID( "1", 1 ) ),
Properties(
3,
{Marker( "Dot" ), Transparency( 0.5 )},
Item ID( "2", 1 )
),
Properties(
4,
{Marker( "Dot" ), Transparency( 0.5 )},
Item ID( "3", 1 )
),
Properties(
5,
{Marker( "Dot" ), Transparency( 0.5 )},
Item ID( "4", 1 )
),
Properties(
6,
{Marker( "Dot" ), Transparency( 0.5 )},
Item ID( "5", 1 )
),
Properties(
7,
{Marker( "Dot" ), Transparency( 0.5 )},
Item ID( "6", 1 )
)
), Legend Model(
13,
Properties( 0, {Transparency( 0.5 )}, Item ID( "A", 1 ) ),
Properties( 1, {Transparency( 0.5 )}, Item ID( "B", 1 ) ),
Properties( 2, {Transparency( 0.5 )}, Item ID( "1", 1 ) ),
Properties(
3,
{Line Style( "Solid" ), Transparency( 0.5 )},
Item ID( "2", 1 )
),
Properties(
4,
{Line Style( "Solid" ), Transparency( 0.5 )},
Item ID( "3", 1 )
),
Properties(
5,
{Line Style( "Solid" ), Transparency( 0.5 )},
Item ID( "4", 1 )
),
Properties(
6,
{Line Style( "Solid" ), Transparency( 0.5 )},
Item ID( "5", 1 )
),
Properties(
7,
{Line Style( "Solid" ), Transparency( 0.5 )},
Item ID( "6", 1 )
)
), Legend Model(
16,
Properties(
2,
{Line Color( 0 ), Line Width( 4 )},
Item ID( "Mean", 1 )
)
)}
),
Dispatch( {}, "", GraphBuilderContainerBox, {Select} ),
Dispatch( {}, "Graph Builder", FrameBox( 2 ),
{DispatchSeg( BarSeg( 1 ), {Line Width( 3 )} )}
),
Dispatch( {}, "400", LegendBox,
{Legend Position(
{11, [-3, -3, -1, -1, -1, -1, -1, -1], 13, [-1, -1, -1, -1, -1, -1,
-1, -1], 16, [-3, -3, 0, -3]}
)}
)
)
);
Data Scientist, Life Sciences - Global Technical Enablement
JMP Statistical Discovery, LLC. - Denver, CO
Tel: +1-919-531-9927 ▪ Mobile: +1-303-378-7419 ▪ E-mail: chris.kirchberg@jmp.com
www.jmp.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Create Curve Plots with Overall Average Curve and Individual Replicate Curves
I got it. I split the data based on Curve Group so Y A and Y B are their own columns. Then put them both on Y. I added line element twice and use CurveID as Overlay. For one of the lines I removed the Overlay Variable to get the mean for A and B. The rest was manipulating thickness and colors of lines via legend and Customize.
I attached split table.
Data Scientist, Life Sciences - Global Technical Enablement
JMP Statistical Discovery, LLC. - Denver, CO
Tel: +1-919-531-9927 ▪ Mobile: +1-303-378-7419 ▪ E-mail: chris.kirchberg@jmp.com
www.jmp.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Create Curve Plots with Overall Average Curve and Individual Replicate Curves
Ok, that works. Still a bit clunky. And in my actual analysis project that I want to do this for, I have dozens of curve groups, and I would want to be able to filter on the curve group...which would require a very wide split table, but would not allow easily filtering on curve group. It would be nice to be able to this with a stacked table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Create Curve Plots with Overall Average Curve and Individual Replicate Curves
I added a link for this thread to https://community.jmp.com/t5/JMP-Wish-List/Graph-Builder-Overlay-by-multiple-columns/idi-p/188405
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Create Curve Plots with Overall Average Curve and Individual Replicate Curves
related post: Graph Builder. Combine Smoother and Line - how?
this is a quite standard type of graphs - unfortunately, or this type of graph JMP stands far behind other tools.
There are creative workarounds, like reformatting the data table (add columns, add dummy rows) or reformatting the graph (plot by row order and hide the reverse jumps by setting the opacity to 0, original post by @XanGregg )
one example:
dt = Open( "$DOWNLOADS/example curve data.jmp" );
dt:X << Set Modeling Type( "Continuous" );
New Column( "falling X",
Character,
Formula( If( :X - Lag( :X ) < 0, "", :Curve Group ) ),
);
Graph Builder(
Size( 518, 448 ),
Show Control Panel( 0 ),
Summary Statistic( "Median" ),
Graph Spacing( 4 ),
Variables(
X( :X ),
Y( :Y ),
Overlay( :Curve Group ),
Color( :falling X )
),
Elements(
Line( X, Y, Legend( 6 ), Ordering( "Row Order" ) ),
Line( X, Y, Color( 0 ), Legend( 7 ) )
),
SendToReport(
Dispatch( {}, "400", ScaleBox,
{Legend Model(
6,
Properties( 0, {Transparency( 0 )}, Item ID( "Missing", 1 ) ),
Properties( 1, {Transparency( 0.5 )}, Item ID( "A", 1 ) ),
Properties( 2, {Transparency( 0.5 )}, Item ID( "B", 1 ) )
), Legend Model(
7,
Properties( 0, {Line Color( 3 )}, Item ID( "A", 1 ) )
)}
)
)
);
real solutions:
a) Graph Builder - Overlay by multiple columns :
b) Implement a one-click option in Graph Builder to hide the jump-back lines:
Graph Builder: Line - possibility to add breaks
Both wishes collected many Kudos over the years, so let's hope that one of them will be implemented soon ...