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

Handles in Graph Builder

I'm trying to understand Handles, especially in Graph Builder.

 

First of all, they don't seem to work.  But beyond that, I don't understand how they could work -- if I enter a Handle() as a script within Graph Builder's "Customize..." Customize Graph dialog, does it execute that script every time the graph is redrawn?  If so, is it creating many instances of a Handle object?

 

I thought this script attached to Big Class would give me a circle that I could drag around the plot, but it doesn't work:

 

Graph Builder(
	Size( 897, 611 ),
	Variables( X( :age ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 8 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"height",
			ScaleBox,
			{Min( 29.6266879535559 ), Max( 70.912 ), Inc( 10 ), Minor Ticks( 1 )}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Reference Line Order( 3 ),
			Add Graphics Script(
				2,
				Description( "" ),
				Handle( 12, 56, Circle( {x, y}, 3 ) )
			)}
		)
	)
)

What am I doing wrong?

1 REPLY 1
jthi
Super User

Re: Handles in Graph Builder

This gives an example how Handle works

Names Default To Here(1); 

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

exx = 3;
exy = 56;

gb = dt << Graph Builder(
	Size(897, 611),
	Variables(X(:age), Y(:height)),
	Elements(Points(X, Y, Legend(8))),
	SendToReport(
		Dispatch(
			{},
			"height",
			ScaleBox,
			{Min(29.6266879535559), Max(70.912), Inc(10), Minor Ticks(1)}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Reference Line Order(3), Add Graphics Script(
				2,
				Description(""),
				Handle(
					exx,
					exy,
					exx = x;
					exy = y;
				);
				show(exx, exy);
				Circle({exx, exy}, 3);
			)}
		)
	)
);
-Jarmo