Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
lwx228
Level VII

How to use JSL to produce Chart that are grouped together for display?

Just like the in the Chart

Thanks!

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "r", formula( If( Row() == 1 | :age != Lag( :age, 1 ), 1, Lag( :r, 1 ) + 1 ) ) );
dt << run formulas;
Column( "r" ) << deleteFormula;
dt << Graph Builder(
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables( X( :r ), Y( :weight ), Group Y( :age ) ),
	Elements( Line( X, Y, Legend( 1 ), Summary Statistic( "Sum" ) ) )
);

2020-08-12_18-48.png

2 REPLIES 2
Highlighted
txnelson
Super User

Re: How to use JSL to produce Chart that are grouped together for display?

Is this the chart you are looking for?  If so, just remove Age from the Y grouping and then make Age an Overlay variable and save the script

overlay.PNG

Jim
Highlighted
lwx228
Level VII

Re: How to use JSL to produce Chart that are grouped together for display?

Thank Jim!

2020-08-12_19-58.png

Article Labels