Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
bobmorrane
Level IV

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 ?

 

 

 

 

Another day, another question :)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
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
Highlighted
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

Highlighted
bobmorrane
Level IV

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

 

 

 

 

 

 

Another day, another question :)
Article Labels

    There are no labels assigned to this post.