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

Graph Builder: how to display only ellipse contour?

Hello everybody,

 

I would like to display Ellipse element in the graph builder but I would like to have only the contour colored and not the full ellipse.

I found a solution using the Customize menu and modifying the Line Color property. However if there are several groups (using the overlay drop zone) it means that every ellipse need to be modified one by one.

Is there a faster way to do that? If possible without using JSL?

 

Here is an example using the Big Class data table:

anne_sa_0-1665392469393.png

 

anne_sa_1-1665392490034.png

 

Thanks in advance for your inputs!

4 REPLIES 4
Phil_Kay
Staff

Re: Graph Builder: how to display only ellipse contour?

I can't see a no-code way to do this in Graph Builder. This might be a good suggestion for the JMP Wish List.

 

You can achieve this more easily in Fit Y by X though. From the red triangle menu you will need to select Group By... to specify the grouping variable. Then select Density Elipse. Then right-click on the plot and select Row Legend to colour by your grouping variable.

 

Phil_Kay_0-1665393830162.png

 

jthi
Super User

Re: Graph Builder: how to display only ellipse contour?

And here is a very messy script example with Find Segs, Legend Server and Legend Display...

Names Default To Here(1);

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


gb = dt << Graph Builder(
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Ellipse(X, Y, Legend(11)))
);

lgnd = gb << Get Legend Display;
server = gb << Get Legend Server;
items = lgnd << Get Items;

// get bars
legend_items1 = {};
legend_items2 = {};
For Each({item}, items, 
	If(item << get type == "Bar",
		Insert Into(legend_items1, Num(Word(2, Word(1, Char(item), ","))));
		Insert Into(legend_items2, Num(Word(2, Char(item), ",")));
		//item << Set Visible(0);
	);
);


fill_colors = {};
For Each({{item1, item2}, idx}, Across(legend_items1, legend_items2),
	Eval(EvalExpr(item = server << Get Legend Item(Expr(item1), Expr(item2))));
	Insert Into(fill_colors, Eval List({item << Get Fill Color}));
	
	item << Set Properties(
		{Transparency(1)}
	);
);

fb = Report(gb)[Frame Box(1)];
segs = fb << Find Segs;
polysegs = Filter Each({seg}, segs, (seg << class name) == "PolySeg");
poly_i = 0;

For Each({item, idx}, polysegs,
	polysegs[idx] << Line Color(fill_colors[idx]);
	polysegs[idx] << Line Width(2);
	polysegs[idx] << Fill Pattern("None");
);

Write();
-Jarmo
anne_sa
Level VI

Re: Graph Builder: how to display only ellipse contour?

Thanks @Phil_Kay for the workaround using the Fit Y by X platform. I think I will follow your advice and add an item to the Wish List!
And thanks @jthi for the script, it's good to have it as well!

jthi
Super User

Re: Graph Builder: how to display only ellipse contour?

@anne_sa has posted this to wish list, here is the post Add a Graph Builder option to display only ellipse contour 

-Jarmo