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