cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
BabyDoragon
Level IV

Graph Arrangement with For Loops

I want to understand how to arrange graphs.
When a user wants to arrange them in two rows with three graphs in each row, I can achieve that using the script below:

New Window( "Test", 
	
	
	H List Box(
		For( i = 1, i < 4, i++,
			Graph Builder(
				Size( 528, 450 ),
				Show Control Panel( 0 ),
				Variables( X( :age ), Y( :height ) ),
				Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
			)
		),

	),
	H List Box(
		For( i = 1, i < 4, i++,
			Graph Builder(
				Size( 528, 450 ),
				Show Control Panel( 0 ),
				Variables( X( :age ), Y( :height ) ),
				Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
			)
		),

	)
	
);

However, when I use a for loop, I am unable to achieve the same effect, as shown below:

New Window( "Test", 
	
	For( k = 1, k < 3, k++,
		H List Box(
			For( i = 1, i < 4, i++,
				Graph Builder(
					Size( 528, 450 ),
					Show Control Panel( 0 ),
					Variables( X( :age ), Y( :height ) ),
					Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
				)
			)
		)
	)
);


What should I modify to make the output of the for loop display the graphs correctly?

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Graph Arrangement with For Loops

I suggest you use Lineup Box(N Col(3)) instead of H List Boxes

 

Edit:

Here is simple example

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

lub = Lineup Box(N Col(3));
For(i = 1, i <= 10, i++,
	lub << Append(
		dt << Graph Builder(
			Show Control Panel(0),
			Variables(X(:weight), Y(:height), Overlay(:sex)),
			Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
		);
	)
);

nw = New Window("report",
	lub
);

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: Graph Arrangement with For Loops

I suggest you use Lineup Box(N Col(3)) instead of H List Boxes

 

Edit:

Here is simple example

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

lub = Lineup Box(N Col(3));
For(i = 1, i <= 10, i++,
	lub << Append(
		dt << Graph Builder(
			Show Control Panel(0),
			Variables(X(:weight), Y(:height), Overlay(:sex)),
			Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
		);
	)
);

nw = New Window("report",
	lub
);

-Jarmo

Recommended Articles