cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Thierry_S
Super User

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
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
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

Recommended Articles