cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
chlnho
Level I

Can't change all marker size in Graph Builder by script

Hi all,

My JMP is 9.0.0 64 bit windows edition.

I have a problem to adjust the marker size by script in the graph builder. I try to use the following code to change all marker size and frame size for every frame box. All frames are reszied corrrectlly but the frame's marker size are not. Only FrameBox(1)'s marker size is changed. I'm trapped in this problme for a couple of days. Any suggestion is appreciated, thanks a lot!

GR = Graph_Builder_1 << Report;

GR << Dispatch( {}, "Graph Builder", Frame Box, {Marker Size( 4 )} );

GR << Dispatch( {}, "Graph Builder", Frame Box, {Frame size( 250, 250 )} );

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Can't change all marker size in Graph Builder by script

Seems like a bug that the message is not inherited by all Frameboxes.

Every FrameBox needs its own message, at least when it comes to Markes Size. This can be done with a loop as in the example below:

dt = open("$sample_data\Big Class.jmp");

gb=Graph Builder(

          Show Control Panel( 0 ),

          Variables( X( :weight ), Y( :height ), Group Y( :sex ) ),

          Elements( Points( X, Y, Legend( 1 ) ) ),

);

summarize(g=by(:sex));

for(i=1, i <= nitems(g), i++,

report(gb) << Dispatch( {}, "Graph Builder", FrameBox(i), {Marker Size( 4 )} )

);

View solution in original post

4 REPLIES 4
pmroz
Super User

Can't change all marker size in Graph Builder by script

That syntax looks OK.  But, how about just setting the marker size when you create the graph builder graph?  This works:

dt = open("$sample_data\Big Class.jmp");

Graph Builder(

      Show Control Panel( 0 ),

      Variables( X( :weight ), Y( :height ) ),

      Elements( Points( X, Y, Legend( 1 ) ) ),

      SendToReport( Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 4 )} ) )

);

chlnho
Level I

Re: Can't change all marker size in Graph Builder by script

Hi PMroz,

   Thanks for the reply, it still doesn't work when number of the frame boxes > 1, for your example, if we add column :sex to Group Y, we got two scatter plot, only the first framebox's marker size are changed.

dt = open("$sample_data\Big Class.jmp");

Graph Builder(

          Show Control Panel( 0 ),

          Variables( X( :weight ), Y( :height ), Group Y( :sex ) ),

          Elements( Points( X, Y, Legend( 1 ) ) ),

          SendToReport( Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 4 )} ) )

);

ms
Super User (Alumni) ms
Super User (Alumni)

Re: Can't change all marker size in Graph Builder by script

Seems like a bug that the message is not inherited by all Frameboxes.

Every FrameBox needs its own message, at least when it comes to Markes Size. This can be done with a loop as in the example below:

dt = open("$sample_data\Big Class.jmp");

gb=Graph Builder(

          Show Control Panel( 0 ),

          Variables( X( :weight ), Y( :height ), Group Y( :sex ) ),

          Elements( Points( X, Y, Legend( 1 ) ) ),

);

summarize(g=by(:sex));

for(i=1, i <= nitems(g), i++,

report(gb) << Dispatch( {}, "Graph Builder", FrameBox(i), {Marker Size( 4 )} )

);

chlnho
Level I

Re: Can't change all marker size in Graph Builder by script

Hi MS,

  It works by sending message to every frame box, thank a lot!