cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
New to using JMP? Hit the ground running with the Early User Edition of Discovery Summit. Register now, free of charge.
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
BabyDoragon
Level I

How can I output the graph in the same window as the button?

When I write the command to output the graph in the button, it actually outputs in a new window. What should I do to output the graph in the same window (as shown in the figure below)?
BabyDoragon_0-1725531492325.png

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw2 = New Window( "New window",
	outputG = Button Box( "Output Graph",
		Outline Box( "Graph Output", 
		Bivariate( y( :weight ), x( :height ) ); )
	)
);
2 REPLIES 2
jthi
Super User

Re: How can I output the graph in the same window as the button?

You could collect them into some display element

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw2 = New Window("New window",
	outputG = Button Box("Output Graph",
		vlb << Append(Outline Box("Graph Output", Bivariate(y(:weight), x(:height))))
	),
	vlb = V List Box()
);
-Jarmo
txnelson
Super User

Re: How can I output the graph in the same window as the button?

The objects created when the button box is clicked need to be appended back to the window.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw2 = New Window( "New window",
	outputG = Button Box( "Output Graph",
		ob = Outline Box( "Graph Output",
			Bivariate( y( :weight ), x( :height ) )
		);
		nw2 << append( ob );
	)
);
Jim