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
lchamber78
Level I

Customize box plot color in JMP preferences

Okay - this has been asked before but based on my screening of several discussions, never thoroughly answered.

 

Our company has recently upgraded to JMP 13. I was upgraded from JMP 10. On my computer, boxplots added to a "fit y by x" oneway graph show up red. On a coworker's computer with a fresh install of JMP 13, boxplots added to a "fit y by x" oneway graph show up black. 

 

For me to get black boxplots I have to go into "Customize" by right clicking on white space in the graph and then individually change every single box plot outline.

 

As my coworker's boxplots do not show up red, this MUST be a setting SOMEWHERE. 

 

There has to be a way to do this without scripting it each time.  

 

Does anyone know???????

Please help. 

7 REPLIES 7
gzmorgan0
Super User (Alumni)

Re: Customize box plot color in JMP preferences

I do not know of a preference to set the default BoxPlotSeq to have Box Type("Outlier") which sets the color to Black, or how to change the default BoxPlotSeg line color.  Maybe a JMP developer has a JSL-Only preference that can do this.

 

Note that GraphBuilder boxplots by default are black.

 

The attached file is an add-in created from the script below. If you install the add-in, then once you create your boxplots, run it from Main Menu > Add-Ins > BlackBoxPlot. 

 

You might want to postpone installing the add-in, in case there are other solutions that can set the default; then this add-in is unnecessary.

 

JSL scripters, with a little additional scripting, using Pick Color(), or a menu to prompt for color, line width, fill and transparency, would allow be a nice app to customize all boxplots. Note this script was written to run on JMP 13 and 14.

 

Names Default To Here(1);
winlst = Window();
For(i=1, i<=nitems(winlst), i++,
   _nme = winlst[i] << Get Window Title;
   _child = winlst[i] << Child;
   If( (_child << class name) == "ListBox", 
      _clnme = _child[OutlineBox(1)] <<get title; 
      If( contains(_nme, "Oneway") | 
       contains( _clnme, "Oneway") |
       contains( _clnme, "Fit Group")
      ,
      bseg = _child  << Xpath("//BoxPlotSeg");
      if(nitems(bseg)>0, bseg << Set Line Color("Black") )//Set Box Type("Outlier"))
      );
    );
 );
lchamber78
Level I

Re: Customize box plot color in JMP preferences

wow that add-in is MUCH better than manually fixing these. Thank you so much!

 

I do wish we could figure out why they are automatically black on my co-worker's machine though. It's very strange!

Re: Customize box plot color in JMP preferences

Maybe they ran out of red ink...

lchamber78
Level I

Re: Customize box plot color in JMP preferences

lol - on a monitor?

Re: Customize box plot color in JMP preferences

LOL was the response I was looking for.

Sachin_Dash
Level I

Re: Customize box plot color in JMP preferences

Thank you for providing such solution but for me after adding the Add-in when I try using this in my variability plot it throws alert "Cannot subscript Display box in access or evaluation of '_child [OutlineBox(1)]' ". Any solution do you have?

jthi
Super User

Re: Customize box plot color in JMP preferences

Most likely it is finding some other window it isn't supposed to (these might have changed in newer version of JMP). For me it did find "Log" window (enchanced log?) which caused the issue so I added check for "Log" window name:

 

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
fit = dt << Oneway(Y(:height), X(:sex), Box Plots(1));

winlst = Get Window List();
For(i = 1, i <= N Items(winlst), i++,
	_nme = winlst[i] << Get Window Title;
	_child = winlst[i] << Child;
	If((_child << class name) == "ListBox" & _nme != "Log",
		_clnme = _child[Outline Box(1)] << get title;
		If(Contains(_nme, "Oneway") | Contains(_clnme, "Oneway") | Contains(_clnme, "Fit Group"),
			bseg = _child << Xpath("//BoxPlotSeg");
			If(N Items(bseg) > 0,
				bseg << Set Line Color("Black")
			)//Set Box Type("Outlier"))
			;
		);
	);
);

You could edit the addin's addin.jmpcust file (found from %appdata%\SAS\JMP\Addins\com.blackboxplot.addin) and add the same check I did or rebuild the addin from the installer and modify code there

jthi_0-1653639818202.png

 

 

-Jarmo