For my research group I have been tasked with generating a control chart that shows the mean value for a process over time, and includes error bars (as standard deviation of the x individual datapoints used to determine the mean value). I have found the following script that other community members have posted in other discussions, but since I am VERY GREEN at JSL scripting I don't know how to incorporate into string values - or if its even possible? I really hope there is a way to do this using JSL, otherwise I have to resort to Excel and do a TON of inefficient, time consuming steps to do everything that Jmp can via JSL (ie. mark by column, color by column, add reference lines, automation of analysis, etc....)
// Add columns with Mean ± SE
New Column( "lower", numeric,
values(
(:Name( "Water Content wt%" ) << get as matrix) –
(:Name( "stdev wt%" ) << get as matrix)
)
);
New Column( "upper",
numeric,
values(
(:Name( "Water Content wt%" ) << get as matrix) +
(:Name( "stdev wt%" ) << get as matrix)
)
);
// Generate chart using Graph Builder platform
Graph Builder(
Show Control Panel( 0 ),
Variables(
X( :Date of Analysis ),
Y( :lower ),
Y( :upper, Position( 1 ) ),
Y( :Name( "Water Content wt%" ), Position( 1 ) )
),
Elements(
Bar(
X,
Y( 1 ),
Y( 2 ),
Y( 3 ),
Legend( 2 ),
Bar Style( "Interval" ),
Summary Statistic( "Mean" )
),
Line( X, Y( 3 ), Legend( 4 ), Row order( 0 ), Summary Statistic( "Mean" ) )
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
2,
Properties( 0, {Line Color( 0 )} ),
Properties( 1, {Line Color( 0 ), Marker( "FilledCircle" )} )
)}
),
Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 3 )} )
)
);