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
bobmorrane
Level V

How to change marker size in a graph window

Hi everyone,

 

 

so I'm making a graph with a map shape using pictures as graph markers. On top of the graph I want to make buttons to change the marker size, so the users don't have to right click --> graph --> marker size --> other -->enter value --> ok. Unfortunately I can't get this property to change. I made buttons that change other properties like graph size or background color which do work.

Here is a sample of my script :

 

win = New Window ("My custom Graph",
      
      V List Box (
      bb = Button Box ("Change marker size", gb << Set Marker Size (40)),
      bb2 = Button Box ("change graph size ", gb<<Size (800, 600)) ,

      gb = Grap builder (
     //all my graph builder arguments
     )

    )

);

 

 

So, why is this not working ? Do I need to use a graph Box instead of Graph Builder ? Or do I need to use an instruction like Send To Report or Dispatch ?

 

Last but not least, what is the logic of making jsl behave this way ? If I can change the graph size using gb<< size, why not have the same with set marker size ?

 

 

 

 

~~Bob~~
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to change marker size in a graph window

There are a couple of issues.  The first of these is that you are referencing the pointer to the entire Graph Builder object when you are referencing gb.  And the setting of the marker size needs to be pointed to the sub object within the report output of gb.  Secondly, the message to set the marker size, is not "set marker size" but rather "marker size".  So your reference to change the marker size should be:

report( gb )[FrameBox(1)] << Marker Size( 40 );

All of this is documented with examples in the Scripting Index

     Help==>Scripting Index

Here is one of the examples on Marker Size taken from the index

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = bivariate( y( :weight ), x( :height ) );
rbiv = biv << report;
framebox = rbiv[Frame Box( 1 )];
framebox << Marker Size( 4 );
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How to change marker size in a graph window

There are a couple of issues.  The first of these is that you are referencing the pointer to the entire Graph Builder object when you are referencing gb.  And the setting of the marker size needs to be pointed to the sub object within the report output of gb.  Secondly, the message to set the marker size, is not "set marker size" but rather "marker size".  So your reference to change the marker size should be:

report( gb )[FrameBox(1)] << Marker Size( 40 );

All of this is documented with examples in the Scripting Index

     Help==>Scripting Index

Here is one of the examples on Marker Size taken from the index

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = bivariate( y( :weight ), x( :height ) );
rbiv = biv << report;
framebox = rbiv[Frame Box( 1 )];
framebox << Marker Size( 4 );
Jim
bobmorrane
Level V

Re: How to change marker size in a graph window

Hi txnelson,

 

I was indeed trying to copy this from the Scripting index but I couldn't quite translate it into the right syntax.

Also, I didn't know how to refer to this frame box because I was not aware of the display tree structure. Going into the "show tree structure" window, I can find which display box I need to refer to. Now with your help I can find my way around more easily.

 

Thanks a lot txnelson

 

 

 

 

 

 

~~Bob~~