cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
chiwei
Level I

What is the meaning of numerical arguments in Legend or Overlay functions?

Hi,

I am a newbie to JSL. I am very confusing about the argument values of legend and overlay functions in Graph Builder. For example,  19-21 and 25-27 in the following script. When I change these values, the graph seems no changes. Besides, I found "Overlay( 0 )" in some scripts. What are the meaning of these values? Thanks a lot in advance!

 

dt = Open("$SAMPLE_DATA/Hybrid Fuel Economy.jmp");

dt << Graph Builder(
	Variables( Y( :Comb MPG ), Y( :Hwy MPG ), Y( :City MPG ), Group X( :Engine ) ),
	Elements(
		Position( 1, 1 ),
		Box Plot( Y, Legend( 19 ) ),
		Caption Box( Y, Legend( 25 ), Summary Statistic( "Median" ) )
	),
	Elements(
		Position( 1, 2 ),
		Box Plot( Y, Legend( 20 ) ),
		Caption Box( Y, Legend( 26 ) )
	),
	Elements(
		Position( 1, 3 ),
		Box Plot( Y, Legend( 21 ) ),
		Caption Box( Y, Legend( 27 ) )
	)
);

 

 

4 REPLIES 4
gzmorgan0
Super User (Alumni)

Re: What is the meaning of numerical arguments in Legend or Overlay functions?

The Legend numbering for GraphBuilder can be a little confusing.  Syntax like Overlay(0) is a binomial option: 0 =>False/No,  1 => True/Yes. There are other numeric options that are types, like Polynomial(3) representing a cubic polynomial, or Spline(.1),  or Marker(3) since Marker options start at 0 it is the 4th marker in the UI display, 

 

On your GraphBuilder window, right click on the disclosure button (gray triangle) to the left of the OutlineBox.  Then scroll to Edit, then select Show Tree Structure. Some of the numbers in a saved script might refer to the display boxes. Hover over items in the tree structure window and they are highlighted in the graphics window. These will be AxisBox(1) or FrameBox(6), etc.  These are references when doing more display customizing.

 

This is not the whole story. If you are new, I suggest you concentrate on the syntax for creating the graphs with options such as, markers, and line types, colors and curve  

gzmorgan0
Super User (Alumni)

Re: What is the meaning of numerical arguments in Legend or Overlay functions?

P.S. Go to Help > Books > JMP Scripting Guide to read the details Chapter 11 describes Display Trees.

pmroz
Super User

Re: What is the meaning of numerical arguments in Legend or Overlay functions?

With a few exceptions, I don't worry about the syntax inside of Graph Builder.  Rather, I use GB to create and customize my plot to my liking, and then click the red triangle and get the code.  

chiwei
Level I

Re: What is the meaning of numerical arguments in Legend or Overlay functions?

Many thanks! I checked the tree structure. It seems none of them could match these mysterious numbers. The graph remained unchanged even I removed all of these legend functions. So as your advice, let me focus on other syntax.