Choose Language Hide Translation Bar
Community Trekker

Re: Change color and size of spec limit lines with JMP14

It does it but it means you replace the spec limits by ref lines.

so if you change your spec limits in a column....

0 Kudos
Super User

Re: Change color and size of spec limit lines with JMP14

If you are running interactively, running a platform other than the Distribution Platform, and are using the Show Limits() feature in JMP, all you have to do is to right click on the axis, and change the linesize and color of the Reference Lines that have been set automatically.

If your need is to do this in a script, then you will either have to not use the Show Limits() feature and just go and read the spec limits and create your own Reference Lines, or if you have the Show Limits() turned on, then yes, you will have to delete and then add back in the reference lines.

0 Kudos

Re: Change color and size of spec limit lines with JMP14

The lines are in the framebox, so sending messages there can change the color and width.

If you go into the frame box and look at the customizations, then you can see where the options are.

After they are set, then copy the frame customizations and paste them into a script window for future used or more editing. 


	Continuous Distribution(
		Column( :Name( "data" ) ),
		PpK Capability Labeling( 1 ),
		Customize Summary Statistics( N Missing( 1 ), N Unique( 1 ) )
objr = obj << report;

objr[framebox(1)]<<{Frame Size( 200, 200 ),
DispatchSeg( LabelSeg( 1 ), {Text Color( "Medium Dark Red" )} ),
DispatchSeg( Line Seg( 1 ), {Line Color( "Medium Dark Red" ),line width(6)} ),
DispatchSeg( LabelSeg( 2 ), {Text Color( "Medium Dark Green" )} ),
DispatchSeg( Line Seg( 2 ), {Line Color( "Medium Dark Green" ),line width(6)} )};

I haven't dinked around with the oulier boxplot, it might follow a different set of rules.

JMP Systems Engineer, Pharm and BioPharm Sciences
0 Kudos
Super User

Re: Change color and size of spec limit lines with JMP14

This discussion intrigued me last week, but I did not have time to investigate and Byron's reply was "similar" to what I was going to write. So this is a synopsis of the discussion with a few additions.


Distribution Platform 

  • If a column has the property Spec Limits defined and the a capability report is specified, the Spec Limits are drawn with the histogram.  These are customizable within the framebox, as Bryon noted.  For this scenario, if there are numerous histograms, I like to do this in bulk using Xpath
Names Default to Here(1);

dt = Open("$Sample_Data/Semiconductor");

dist = dt <<  Distribution(
		Y( :NPN1, :PNP1, :PNP2, :NPN2, :PNP3 ),
		Horizontal Layout( 1 ),
		Vertical( 0 ),
		Histogram Color("Medium Light Gray")

_xx = dist << Xpath("//LineSeg");

_xx << Line Width(3);
_xx << Line Color("Medium Dark Red"); // or specify RGB Color({r,b,g})
  • However, (as Bryon noted) this is not the same for the distribution boxplots and normal quantile plots.  If the coumn specification, includes the feature to Show Limits(1) then the spec limits do appear on the boxplots and the quantile plots, but this customization is via the AxisSettings interface as Jim clearly documented. 

Other platform graphs

  • For other platform graphs, such as Bivariate, the Spec Limits are displayed only if the Spec Limits property includes ShowLimits(1). And like the Distribution boxplot and quantile plot, these are the thin blue ref lines defined and customized with the AxisSettings. 

Nothing new so far. But here are a few items to note:

  • The message to add a reference line to an axis box is documented as below.  However, not documented is an optional  sixth argument that I will call pct that defines the transparency.  The value should be 0 up to and including 1 for 0% and 100%, respectively.


axis box << Add Ref Line(number, "linestyle", <"color">, <"label">, <width>)
  • To delete the old thin blue axis setting ref lines, you need to specify the value. A nice to have would be to remove by value or label, such as a list of axisBox refernces, _xx,  and _xx << Remove Ref Line("USL") . 


axis box << Remove Ref Line ( value );
  • In case you are not aware, the frame box customization determines the "layering" the order of grid lines, reference lines, line seg, box seg, etc. Currently, JSL has only a few messages to manage the layering/order. Via the GUI, select a frame box element and use the up and down arrow keys to determine the order.  Save script will save the Grid Line Order, the Reference Line Order and the graphics scripts' order. But it doe not save the fitted line or markers, or other seg order.


frame box << Reference Line Order( pos ); 
//default position, pos, is 2 above the grid lines but behind all graph elements.

frame box <<  Grid Line Order( pos );  //default is 1

frame box << Add Graphics Script(<order>, <Description("name")>, <script>); 
order An optional argument that specifies the order in which the graphics elements are drawn. 
The value can be the keyword Back or Forward or an integer that specifies the drawing order
for a number of graphics elements. 1 means the object is drawn first. */
  • To get your graph to update after changing the order via JSL, you need to send two messages to the object Inval and  Update Window().

I like to find JSL alternatives to GUI interfaces and methods to apply to many similar objects.  Attached are 2 jsl scripts. RefLineFunctions.jsl defines 2 functions: ShowSpecs() and ModifyRefLine(). This should be saved and used as an Include() file. The second script RefLineExamples.jsl provides usage for the Distribution and Bivariate platforms. You will need to change the path of the Include() file if you saved it to some other drive, other than c:/temp/   I cannot guarantee this will work in French JMP. 


Note the ModifyRefLine() function could use the Remove and Add Ref Line messages, but I kept this as an example of editing axis settings.