cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

For loop

I would like to generate all these plots in one tab, rather than generating 50 different pages, can anyone help ? thank you 

dt = Current Data Table();
For( i = 1, i <= 50, i++,
	dt << Bivariate(
		Y( Column( dt, "u" || Char( i ) ) ),
		X( Column( dt, "oven.T" ) ),
		Fit Line( {Line Color( {212, 73, 88} )} )
	)
);

 

2 REPLIES 2
txnelson
Super User

Re: For loop

Here is one way to do what you want

Names Default To Here( 1 );
dt = 
// Open Data Table: semiconductor capability.jmp
// → Data Table( "semiconductor capability" )
Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
colListY = {};
For( i = 1, i <= 10, i++,
	Insert Into( colListY, "NPN" || Char( i ) )
);

dt << Bivariate(
	Y( Eval( colListY ) ),
	X( Column( dt, "PNP1" ) ),
	Fit Line( {Line Color( {212, 73, 88} )} )
);

Here is another way

Names Default To Here( 1 );
dt = 
// Open Data Table: semiconductor capability.jmp
// → Data Table( "semiconductor capability" )
Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
colListY = {};
For( i = 1, i <= 10, i++,
	Insert Into( colListY, "NPN" || Char( i ) )
);
New Window( "My Output",
	H List Box(
		For( i = 1, i <= 10, i++,
			dt << Bivariate(
				Y( Column( dt, colListY[i] ) ),
				X( Column( dt, "PNP1" ) ),
				Fit Line( {Line Color( {212, 73, 88} )} )
			)
		)
	)
);
Jim

Re: For loop

Thank you!

 

Recommended Articles