Choose Language Hide Translation Bar
Highlighted
Thierry_S
Level VI

Graph Builder in Loop: How do I maintain Y-axis scale across each column?

Hi JMP Community,

 

I just ran into a little problem with the auto-scalling of axis in the GB platform.

I wish to loop through 100 columns to plot some data on a fixed Y scale (i.e. Min = -1.3, Max = 0.2, Increment = 0.2).

When I save the script from GB, the SendToReport > Dispatch command refers to the Y Axis by its label ("Y-Axis") which will change for each column when I loop through my 100 columns. Thus, how do I replace the expression on line #11 with a relative reference (I tried: Column Name (i) without success). 

Here is the snippet of the code I'm trying to Loop through:

 

Graph Builder(
	Variables(
		X( :Visit Description ),
		Y( column(i) ),
		Overlay( :TRT01 )
	),
	Elements( Line( X, Y, Legend( 9 ), Error Bars( "Standard Error" ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Y AXIS", // Column Name (i)?
			ScaleBox,
			{Min( -1.3 ), Max( 0.3 ), Inc( 0.2 ), Minor Ticks( 1 )}
		)
	)
);

NOTE: I tried to Lock the axis without success.

 

Thank you for your help.

 

Sincerely,

 

TS

Thierry R. Sornasse
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: Graph Builder in Loop: How do I maintain Y-axis scale across each column?

Try this:

Graph Builder(
	Variables(
		X( :Visit Description ),
		Y( column(i) ),
		Overlay( :TRT01 )
	),
	Elements( Line( X, Y, Legend( 9 ), Error Bars( "Standard Error" ) ) ),
	SendToReport(
		Dispatch(
			{},
			eval(column(i)<<get name), // Column Name (i)?
			ScaleBox,
			{Min( -1.3 ), Max( 0.3 ), Inc( 0.2 ), Minor Ticks( 1 )}
		)
	)
);
Jim

View solution in original post

1 REPLY 1
Highlighted
txnelson
Super User

Re: Graph Builder in Loop: How do I maintain Y-axis scale across each column?

Try this:

Graph Builder(
	Variables(
		X( :Visit Description ),
		Y( column(i) ),
		Overlay( :TRT01 )
	),
	Elements( Line( X, Y, Legend( 9 ), Error Bars( "Standard Error" ) ) ),
	SendToReport(
		Dispatch(
			{},
			eval(column(i)<<get name), // Column Name (i)?
			ScaleBox,
			{Min( -1.3 ), Max( 0.3 ), Inc( 0.2 ), Minor Ticks( 1 )}
		)
	)
);
Jim

View solution in original post

Article Labels

    There are no labels assigned to this post.