cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Have your say in shaping JMP's future by participating in the new JMP Wish List Prioritization Survey
Choose Language Hide Translation Bar
Neo
Neo
Level VI

How to dynamically set auto y-axis scale as parameters are selected in local data filter for (graph builder) charts by variable?

This script below generates data in a format similar to my actual data and then plots charts in a layout I would like.

Multiple parameters are plotted in the y-axis as they are selected in the local data filter. This is useful for me as I can compare trends on related parameters in my actual data.

Without using Graph builders "Page" option or creating additional columns in the data table, is there a way to get independent best-fit/auto y-axis scales as parameters are selected in local data filter? I am thinking in terms of getting a handle to the Display Trees and Filter Change Handler, but do know how to proceed. Some help would be useful. 

Names Default To Here(1);
clear log ();
dt = Open("$SAMPLE_DATA/Probe.jmp");
// Combine columns 1
Data Table( "Probe" ) << Combine Columns(columns( :Lot ID, :Wafer Number ),	Column Name( "LotWafer" ),	Delimiter( "." ));
// Combine columns 2
Data Table( "Probe" ) << Combine Columns(columns( :Die X, :Die Y ), Column Name( "[X,Y]" ), Delimiter( "," ));
// Delete columns
Data Table( "Probe" ) << Delete Columns( :Lot ID, :Wafer Number, :Die X, :Die Y );
grouped_cols = dt << get column group( "Responses" );

// Transpose data table // → Data Table( "Transpose of Probe" )
Data Table( "Probe" ) << Transpose(	columns (grouped_cols),	By( :LotWafer, :Process, :Start Time ),
	Label( :Site ),	Output Table( "Transpose of Probe" ));
close (dt, no save);

// Add column
dt = Current Data Table (); 
Data Table( "Transpose of Probe" ) 
<< New Column("Mean", Numeric, "Continuous", Format("Best", 12 ), Formula(Mean( :"1"n, :"2"n, :"3"n, :"4"n, :"5"n )));

//Plot chart
dt = Graph Builder(
	Size( 570, 458 ),
	Show Control Panel( 0 ),
	Y Group Edge( "Left" ),
	Variables(X(:LotWafer, Order By( :Start Time, Ascending, Order Statistic( "Mean" ) )),
		     Y( :Mean ), Group Y(:Label,	Order By( :Process, Ascending, Order Statistic( "Mean" ) ))	),
	Elements( Points( X, Y, Legend( 23 ) ) ),
	Local Data Filter(Conditional, Add Filter(columns( :Label ),Where( :Label == {"30D1_7X100_IL_12V", "30D1_7X100_IL_25V"} ),
			Display( :Label, Find( Set Text( "" ) ) ))),
	SendToReport(Dispatch({},"Mean",ScaleBox,{ Min( -0.0000336 ), Max( 0.00004544 ), Inc( 0.00001 ),Minor Ticks( 1 )})));

Note the Min/Max values in the last line copied from the script after interactively using the Graph Builder to display data properly. 

 

When it's too good to be true, it's neither
2 REPLIES 2
jthi
Super User

Re: How to dynamically set auto y-axis scale as parameters are selected in local data filter for (graph builder) charts by variable?

If you are using Y-Group I think the Y-axis are linked together. One option could be to create new Mean column which has been scaled, so all Labels fit to similar axis (also remove the min/max/inc from graph builder script, to allow JMP perform it's own axis calculations).

-Jarmo
Neo
Neo
Level VI

Re: How to dynamically set auto y-axis scale as parameters are selected in local data filter for (graph builder) charts by variable?

@jthi Thanks. As mentioned in OP, I would prefer not to make a new columns as in my actual data as I would then need to do this for hundreds of columns.

JMPs autoscaling was not satisfactorily showing the data, hence I used min/max  (copied from the script after interactively using the Graph Builder to display data properly, as mentioned in my OP).

When it's too good to be true, it's neither