Hello!
I am trying to make the top and right border on the attached graph black and size 2 to make it publication quality. I am able to toggle it on and off using Right click -> Graph -> Border though. I checked the properties as well and I am unable to see a option to change it.
Additionally, I want to put a outline around the Legend frame box if possible?
Thanks!
So you have JMP graph in which you have legend set inside the graph like this
and you wish to add box around the legend? With scripting you can send message << Border(15) for example to add black borders like this
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Legend Position("Inside Right"),
Variables(X(:weight), Y(:height), Color(:sex)),
Elements(Points(X, Y, Legend(3)), Smoother(X, Y, Legend(5))),
SendToReport(
Dispatch({}, "400", ScaleBox,
{Legend Model(
5,
Base(0, 0, 1, Item ID("Smooth", 1)),
Properties(0, {Line Color(-9939840)}, Item ID("Smooth", 1))
)}
),
Dispatch({}, "400", LegendBox, {Set Title("Legend")})
)
);
Report(gb)[LegendBox(1)] << Border(15);
I assume border follows same "numbering" as Border Box and you can find info from here Scripting Guide > Display Trees > Construct Custom Windows > Construct Display Boxes for New Window... . I think after you do this once, you can save it as a preset and then use the preset for other graph builders if necessary
Jarmo said:
> I assume border follows same "numbering" as Border Box
I would suggest using <<Border(1) rather than <<Border(15). The general Border property works like Padding and Margin, except that currently only 1-pixel borders are currently supported. If that were to change, a setting of 15 might be a bit surprising!
You can also explicitly use <<Border(Left(1), Top(1), Right(1), Bottom(1)) to make it more clear. When a single value is used, it applies to all sides.