cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Jackie_
Level VI

Get Y axis column name from the variability chart

Hi,

 

Is there a way to get the Y axis column name from the variability? I tried using get Y axis but doesn't work. Any suggestions?

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp" );
obj = dt << Variability Chart( Y( :Measurement ), X( :Operator, :part# ) );

ax = obj << get y axis;
Show( ax );

chart

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: Get Y axis column name from the variability chart

Here is one way to get the Y column name

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp" );
obj = dt << variability chart( Y( :Measurement ), X( :Operator, :part# ) );

// Parse the returned script to find the specified Y column
theYColumn = Word(
	1,
	Substr( Char( obj << get script ), Contains( Char( obj << get script ), "Y(:" ) + 3 ),
	"),"
);
Jim

View solution in original post

jthi
Super User

Re: Get Y axis column name from the variability chart

Column name is in at least four different places:

  • Your creation script
  • Three times in the report
    • Variability Gauge Analysis for Measurement
    • Variability Chart for Measurement
    • And Y-axis

Is there a specific reason to get it from Y-axis which is most likely the most difficult one?

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp");

var = dt << Variability Chart(Y(:Measurement), X(:Operator, :part#));

yaxis_text = Report(var)["Variability Chart for Measurement", Text Box(1)] << get text;
-Jarmo

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: Get Y axis column name from the variability chart

Here is one way to get the Y column name

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp" );
obj = dt << variability chart( Y( :Measurement ), X( :Operator, :part# ) );

// Parse the returned script to find the specified Y column
theYColumn = Word(
	1,
	Substr( Char( obj << get script ), Contains( Char( obj << get script ), "Y(:" ) + 3 ),
	"),"
);
Jim
jthi
Super User

Re: Get Y axis column name from the variability chart

Column name is in at least four different places:

  • Your creation script
  • Three times in the report
    • Variability Gauge Analysis for Measurement
    • Variability Chart for Measurement
    • And Y-axis

Is there a specific reason to get it from Y-axis which is most likely the most difficult one?

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp");

var = dt << Variability Chart(Y(:Measurement), X(:Operator, :part#));

yaxis_text = Report(var)["Variability Chart for Measurement", Text Box(1)] << get text;
-Jarmo
Jackie_
Level VI

Re: Get Y axis column name from the variability chart

I am trying to create an interactive plot with radio buttons and column switchers. For that I need to get column names in the current Y axis VC to be able to replace columns in the column switcher

Jackie_
Level VI

Re: Get Y axis column name from the variability chart

Thanks Jim and Jarmo!