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
OneNorthJMP
Level IV

For loop to show Variability Plot with Row Legend

I want to plot multiple Variability plot with withe row legend display at the right. But when do this with the for loop, the row legend is not able to display. can anyone please advice? 

 

the graph i intended to have for every parameters. 

with_legend.PNG

 

instead i only get the graph below with row legend display on the right. 

wo_legend.PNG

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );


/* Obtain a list of numeric/continuous column names as strings */
colList = dt << Get Column Names( Continuous, String );


For( i = 2, i <= Nitems( colList ), i++,
	
	Variability Chart(
		Y( colList[i] ),
		X( :lot_id, :wafer ),
		Connect Cell Means( 1 ),
		Std Dev Chart( 0 ),
		SendToReport(
			Dispatch(
				{},
				"Variability Chart for " || colList[i],
				OutlineBox,
				{Set Title( "GROUP 1 Variability Chart for " || colList[i] )}
			),
			Dispatch(
				{"Variability Chart for " || colList[i]},
				"Variability Chart",
				FrameBox,
				{Row Legend(
					lot_id,
					Color( 1 ),
					Color Theme( "JMP Default" ),
					Marker( 1 ),
					Marker Theme( "Standard" ),
					Continuous Scale( 0 ),
					Reverse Scale( 0 ),
					Excluded Rows( 0 )
				)}
			)
		)
	);

);

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
tom_abramov
Level V

Re: For loop to show Variability Plot with Row Legend

Hi,

please run the following code.

I hope it does the job.

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );


/* Obtain a list of numeric/continuous column names as strings */
colList = dt << Get Column Names( Continuous, String );
win = New Window("Example");

For( i = 2, i <= Nitems( colList ), i++,
	
	win << Append(varobj = Variability Chart(
		Y( Column(dt,colList[i]) ),
		X( :lot_id, :wafer ),
		Connect Cell Means( 1 ),Std Dev Chart( 0 )
	));
	(varobj << report)[OutlineBox(1)] << set Title("GROUP 1 " || ((varobj << report)[OutlineBox(1)] << Get Title));
	(varobj << report)[FrameBox(1)] << Row Legend(Column(dt,"lot_id"),Color( 1 ),Marker( 1 ));
);

View solution in original post

3 REPLIES 3
Highlighted
tom_abramov
Level V

Re: For loop to show Variability Plot with Row Legend

Hi,

please run the following code.

I hope it does the job.

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );


/* Obtain a list of numeric/continuous column names as strings */
colList = dt << Get Column Names( Continuous, String );
win = New Window("Example");

For( i = 2, i <= Nitems( colList ), i++,
	
	win << Append(varobj = Variability Chart(
		Y( Column(dt,colList[i]) ),
		X( :lot_id, :wafer ),
		Connect Cell Means( 1 ),Std Dev Chart( 0 )
	));
	(varobj << report)[OutlineBox(1)] << set Title("GROUP 1 " || ((varobj << report)[OutlineBox(1)] << Get Title));
	(varobj << report)[FrameBox(1)] << Row Legend(Column(dt,"lot_id"),Color( 1 ),Marker( 1 ));
);

View solution in original post

Highlighted
jimloughlin
Level III

Re: For loop to show Variability Plot with Row Legend

When I run this code, it seems to be stuck in a loop.  At anyrate, JMP appears to  hang.  I am running version 13.2.1

Highlighted
OneNorthJMP
Level IV

Re: For loop to show Variability Plot with Row Legend

Hi Tom, 

 

Same as Jim finding, it take long time to run and hang intermittent. But i got it work on one time though. 

Article Labels