Subscribe Bookmark RSS Feed

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

chlnho

Community Trekker

Joined:

Oct 30, 2011

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
Solution

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 )} )

);

4 REPLIES
pmroz

Super User

Joined:

Jun 23, 2011

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

Community Trekker

Joined:

Oct 30, 2011

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 )} ) )

);

Solution

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

Community Trekker

Joined:

Oct 30, 2011

Hi MS,

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