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

GB by page log scale with JSL

If i only do graph builder with page, i can do the log scale with JSL without any issue. But when i adding graph builder by page. the log scale only happend to 1st page only. the other page don't have the log scale. Can anyone advise how to get it done? 

 

cht_NFC_RD_BE_FME_SB = dt_NFC_RD_BE_FME_SB << Graph Builder(
	Size( 1058, 1464 ),
	Show Control Panel( 0 ),
	Variables( 
		X( :CYC ), 
		Y( :Name( "NFC_RD_BE_FME_SB(Cnt)" ) ), 
		Page( :Wafer ) 		
	),
	Elements( Box Plot( X, Y, Legend( 4 ) ), Line( X, Y, Legend( 5 ) ) )
);
Report(cht_NFC_RD_BE_FME_SB)[Axisbox(2)] << {Scale("Log"), Min( 1 ), Max( 4096 ), Inc( 1 ), Minor Ticks(1), Show Major Grid(1)};

 

1st page get the log scale , but 2nd page onward don't get the log scale. 

OneNorthJMP_0-1630593731042.png

 

1 REPLY 1
jthi
Super User

Re: GB by page log scale with JSL

You are only getting the reference to first graph with

Report(cht_NFC_RD_BE_FME_SB)[Axisbox(2)] 

You could get all the references and then loop over them or then possibly use Xpath (not sure how to get all axis references without it in a list when using just DisplayBoxes) and set them all at the same time. Something like this could work:

 

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

gb = dt << Graph Builder(
	Size(534, 956),
	Show Control Panel(0),
	Variables(X(:Time), Y(:Exponential), Page(:Censor)),
	Elements(Points(X, Y, Legend(8)), Smoother(X, Y, Legend(9))),
	SendToReport(Dispatch({}, "Exponential", ScaleBox, {Format("Best", 9)}))
);

rep = Report(gb) << XPath("//AxisBox");
rep = rep[2::N Items(rep)::2]; //get every other value
rep << {Scale("Log"), Minor Ticks(1), Show Major Grid(1)};

Understanding the Xpath and "matrix operation" are quite critical here, and I suggest playing around with them a bit to understand what is going on.

 

-Jarmo