cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
fever
Level III

set default line widths on map shapes in graph builder

Is it possible to set a different default line width on a map shape in graph builder? Currently, every time I make a map with a referenced "map role" column in graph builder it defaults to a width of 1. To change it to the appropriate scale, I have to go to: customize graph>Shape:>line width and change it manually every time. Thanks

5 REPLIES 5
Franck_R
Level III

Re: set default line widths on map shapes in graph builder

Hi I'm also very interested to that question has we use a lot the map shape functionnality but the result is in certain cases a little 'messy' and we use the line width to clean up a bit the visualisation.

Does anyone have the answer? The customize menu doesn't seem to be mentioned in the jsl script index...

jthi
Super User

Re: set default line widths on map shapes in graph builder

Not sure if there is any way to modify defaults related to Shape's line width but here is one way to script it:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/PopAgeGroup.jmp");

gb = dt << Graph Builder(
	Variables(Shape(:Country)),
	Elements(Map Shapes(Legend(10)))
);

seg = Report(gb)[FrameBox(1)] << Find Seg(Shape Seg(1));
seg << Line Width(1);
wait(1);
seg << Line Width(2);
wait(1);
seg << Line Width(3);
-Jarmo
Franck_R
Level III

Re: set default line widths on map shapes in graph builder

Great thanks it works for my needs! I was searching for a kind of option linked to graphic builder and not linked to an object

jthi
Super User

Re: set default line widths on map shapes in graph builder

I found this by letting JMP first script it for me. I first modified the line width from Customize menu

jthi_0-1661936260595.png

and then got the script for Graph Builder to Clipboard

Graph Builder(
	Variables(Shape(:Country)),
	Elements(Map Shapes(Legend(10))),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{DispatchSeg(Shape Seg(1), {Line Width(11)})}
		)
	)
)

From there I knew I can use Find Seg to get reference to Shape Seg(1) and finally I just tried if << Line Width() would work. Of course after knowing that you are supposed to look for Shape Seg instead of Graph Builder, you can also search for that in Scripting Index.

-Jarmo
Franck_R
Level III

Re: set default line widths on map shapes in graph builder

Yes good point I didn't have the thought to record the script of the graph, although it's something I often use to find tricky options, I just saw that a manual modification wasn't recorded in the log and I didn't go further to find the jsl transcript by a other way. Shame on me!