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

How to do interactive Graph Builder in a custom window without toolbars or menus?

Currently I have the following script:

 

gb = Graph Builder(...);
rgb = Report(gb);
win = New Window("Custom Window", Show Menu( 0 ), Show Toolbars( 0 ), rgb);
gb << Close Window;

This way I get my small GB plot in a nice window without unnecessary user controls.

The problem is that I cannot select points on that plot - it's a report, plot is not interactive.

 

How do I either:

a) make it interactive, so a user could interact with the plot, or 

b) stay with the original Graph Builder window - but remove menus, toolbars etc.?

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How to do interactive Graph Builder in a custom window without toolbars or menus?

You can just run Graph Builder inside new window (I have used expression, as it makes new window part cleaner).

Names Default To Here(1); 

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

gb_expr = Expr(gb = dt << Graph Builder(
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
));

nw = New Window("GB", Show Menu(0), Show Toolbars(0),
	gb_expr
);
-Jarmo

View solution in original post

6 REPLIES 6
jthi
Super User

Re: How to do interactive Graph Builder in a custom window without toolbars or menus?

You can just run Graph Builder inside new window (I have used expression, as it makes new window part cleaner).

Names Default To Here(1); 

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

gb_expr = Expr(gb = dt << Graph Builder(
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
));

nw = New Window("GB", Show Menu(0), Show Toolbars(0),
	gb_expr
);
-Jarmo
miguello
Level VI

Re: How to do interactive Graph Builder in a custom window without toolbars or menus?

That's how you do it! It works!

However, I'm getting into another problem now. My plot is a series of wafer maps (wrapped by WaferID), and therefore need to be circles (not ovals). So I specifically set the size of the FrameBox:

(gb << xpath( "//FrameBox" )) << Set Width( 100 )<< Set Height( 100 )

Now, when window is created first, it has a size, and content (my plot) is stretched to fit the window. Even if I say:

(gb << xpath( "/OutlineBox" ))<<Set Stretch( "Off", "Off" );

It will ignore my size setting, stretch the plots to fit the window, and THEN turn off stretching.

 

Any idea how to go around it? Like, tell window to change its size according to content, not the other way around?

 

 

 

 

jthi
Super User

Re: How to do interactive Graph Builder in a custom window without toolbars or menus?

This partially depends (on my experience) which display box you use to wrap the graph builder in. Is it just new window or something weirder like sheet box or v splitter box? Sometimes something like this will be enough

Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Wafer Stacked.jmp");

gb_expr = Expr(
	gb = dt << Graph Builder(
		Show Control Panel(0),
		Variables(X(:X_Die), Y(:Y_Die), Wrap(:Wafer), Color(:Defects)),
		Elements(Heatmap(X, Y, Legend(5)))
	);
	//gb << Fit To Window("Off");
	(gb << xpath("//FrameBox")) << Set Height(100);
	(gb << xpath("//FrameBox")) << Set Width(200);
);

nw = New Window("GB", Show Menu(0), Show Toolbars(0),
	gb_expr
);
// report(gb)[FrameBox(1)] << Get Min Size;
// report(gb)[FrameBox(1)] << Get Max Size;
-Jarmo
miguello
Level VI

Re: How to do interactive Graph Builder in a custom window without toolbars or menus?

Yes, I tried it initially the same way, the problem is that it doesn't work - <<Set Height and <<Set Width are ignored when placing Graph Builder platform inside window.

jthi
Super User

Re: How to do interactive Graph Builder in a custom window without toolbars or menus?

I'm not sure where they are ignored

Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Wafer Stacked.jmp");

gb_expr = Expr(
	gb = dt << Graph Builder(
		Show Control Panel(0),
		Variables(X(:X_Die), Y(:Y_Die), Wrap(:Wafer), Color(:Defects)),
		Elements(Heatmap(X, Y, Legend(5)))
	);
	gb << Fit To Window("Off");
	(gb << xpath("//FrameBox")) << Set Height(10);
	(gb << xpath("//FrameBox")) << Set Width(15);
);

nw = New Window("GB", Show Menu(0), Show Toolbars(0),
	gb_expr
);
nw << Set Window Size(1900, 1000);

// report(gb)[FrameBox(1)] << Get Min Size;
// report(gb)[FrameBox(1)] << Get Max Size;
-Jarmo
miguello
Level VI

Re: How to do interactive Graph Builder in a custom window without toolbars or menus?

If I just run the expression, it will open in its own window, and there I can control FrameBox sizes, below is example of 50x50 on top of 100x100 FrameBoxes. Basically, that's what I need - only in a custom window without menus etc.

2023-08-31 13_00_06-Wafer Stacked - Graph Builder 2 - JMP.png

This is what I get if run it in the new window. No matter what sizes you specify - it ends up like this.

2023-08-31 13_00_49-GB - JMP.png