How to show multiple summary statistics in a graph for single set of pointsHi,
I'm building a graph using a scattered plot.
My points are based on the "mean" statistics.
I'd like to add labels of "mean" and "N" statistics to the same points.
Since the scale is very different between "mean" and "N", adding second set of same points to the graph hides all the differences of "mean" statistics.
How can I show both statistics to the single set of "mean" points?
I'm hoping I don't have to use JSL script if there's a simple way to do this.
If I have to script, I tried this but "N" labels never show up while "mean" labels show up as expected.
Can anybody help?
Thank you so much!
Graph Builder(
Variables( X( :p ), Y( :a ) ),
Elements(
Points(
X,
Y,
Legend( 5 ),
Summary Statistic( "Mean" ),
Marker Size( 8 ),
Marker Color( "Medium Blue" ),
Label( "Label by Value" ),
)
),
Elements(
Text(
X,
Y,
Summary Statistic( "N" ),
Label( "Name and Value" ),
Jitter( 0 ),
Label Justification( "Right" ),
Set Font Style( "Bold" ),
Set Font Size( 12 )
)
),
SendToReport( Dispatch( {}, "Graph Builder", OutlineBox, {Set Title( "Mean Points with N Labels" )} ) )
);
txnelson edit: moved code to JSL display box

Data Exploration and VisualizationRe: How to show multiple summary statistics in a graph for single set of pointsHow about Caption / Graph per factor?


Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
Size( 643, 335 ),
Graph Spacing( 4 ),
Variables( X( :age ), Y( :height ) ),
Elements(
Points( X, Y, Legend( 4 ), Summary Statistic( "Mean" ) ),
Caption Box(
X,
Y,
Legend( 5 ),
Summary Statistic( "Mean" ),
Summary Statistic 2( "N" ),
Location( "Graph per factor" )
)
)
);
Re: How to show multiple summary statistics in a graph for single set of pointsUse a column to create the label - and use it as Shape Column


Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Column( "label",
Character,
Formula(
Char( Round( Col Mean( :height, :age ) ) ) || "
" ||
Char( Col Number( :height, :age ) )
)
);
Graph Builder(
Variables( X( :age ), Y( :height ) ),
Elements(
Points(
X,
Y,
Legend( 3 ),
Summary Statistic( "Mean" ),
Set Shape Column( :label )
),
Points( X, Y, Legend( 4 ), Summary Statistic( "Mean" ) )
),
SendToReport(
Dispatch( {}, "400", ScaleBox,
{Legend Model(
4,
Properties( 0, {Marker( "Circle" ), Marker Size( 30 )}, Item ID( "Mean", 1 ) )
)}
)
)
);
Re: How to show multiple summary statistics in a graph for single set of pointsyou can stack different types of markers, like Bar/Float, Circle and marker with Marker shape:
N: inside the circle
mean: on the right

Re: How to show multiple summary statistics in a graph for single set of pointsThank you so much, hogi!
This is exactly how I envisioned!
You made my day!!!