cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
aaronjiang
Level I

Input string variable that is the header for the column, and plot that column as Y axis

I am trying to manually input a string variable that matches to one of the header of the columns so I can plot specifically choose column to plot on Y axis as needed. My script is below, but it doesn't seem to work. Hope someone can help.

 

User_Input = New Window( "Enter Lot Number",
	<<modal(),
	H List Box(
		Text Box( "Enter Lot Number:" ),
		lot_num_teb = Text Edit Box( "", <<set width( 200 ) ),

	),
	Text Box( "Click OK to save" ),
	Button Box( "OK", lot_num = lot_num_teb << get text() ), 

);


Linearity_Plot << Graph Builder(
	Variables(
		X( :Tape value ),
		Y( :Name( "Historical - 1s" ) ),
		Y( :Name( "Historical + 1s" ), Position( 1 ) ),
		Y( :Name( "Historical - 2s" ), Position( 1 ) ),
		Y( :Name( "Historical + 2s" ), Position( 1 ) ),
		Y( :lot_num, Position( 1 ) ),
		Page( :Feature )
	)
);
1 REPLY 1
txnelson
Super User

Re: Input string variable that is the header for the column, and plot that column as Y axis

You need to tell JMP to use the string/character variable lot_num to use it as a column.  To do this, use the 

     As Column()

function

User_Input = New Window( "Enter Lot Number",
	<<modal(),
	H List Box(
		Text Box( "Enter Lot Number:" ),
		lot_num_teb = Text Edit Box( "", <<set width( 200 ) ),

	),
	Text Box( "Click OK to save" ),
	Button Box( "OK", lot_num = lot_num_teb << get text() ), 

);


Linearity_Plot << Graph Builder(
	Variables(
		X( :Tape value ),
		Y( :Name( "Historical - 1s" ) ),
		Y( :Name( "Historical + 1s" ), Position( 1 ) ),
		Y( :Name( "Historical - 2s" ), Position( 1 ) ),
		Y( :Name( "Historical + 2s" ), Position( 1 ) ),
		Y( as column( lot_num ), Position( 1 ) ),
		Page( :Feature )
	)
);
Jim