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
Jonkandonkan
Level III

Questions regarding box plot graphics

Hi 
Im doing some box plots and got some trouble regarding the spacing between boxed etc. 
To get points separated I moved Gender from overlay to the X-axis (see pictures). However, the spacing changed so thereäs more empty space between boxes. Makes sense so the points can be seen and jittered. However I would like to try with less space between and use transparent points. But can't find any solution/option to change this? Also, would like some option to color/change ALL boxes att the same time, like holding Ctrl and clicking could've done.. 


Without points
JMPBOX.PNG


With points, and sex on X-axis instead of overlay. 
JMPBOX2.PNG


2 REPLIES 2
gzmorgan0
Super User (Alumni)

Re: Questions regarding box plot graphics

@Jonkandonkan,

 

There are JMP Scripting Language methods that can make easy work of changing all boxplots (BoxplotSeg) at once.  For example, once the target window is found, say ::_curWin represents the current window, something like this can be used.

 

 

_boxseg = (::_curWin << Child) << Xpath("//BoxPlotSeg");

_boxseg << {Line Color({0,0,0}), Confidence Diamond( 0 ), Fences( 1 ),
			 Line Width( 2 ), Transparency(1.0)
			};

 

 

Note that ::_curWin can be found by defining a HotKey (I use Ctrl+Alt+G).  However, the script becomes a little more involved if you want this done for windows that might have multiple boxplot graphs and if you are wanting points and not filled, or filled with an overlay color.  For example, for filled boxplots, each boxplot segment color needs to be determined then 

_boxseg = (::_curWin << Child) << Xpath("//BoxPlotSeg");

for(i=1, i<=nitems(_boxseg), i++,
fc = _boxseg[i] << get fill color;
_boxseg[i] << {BoxStyle("Normal"), Line Color({0,0,0}), Confidence Diamond( 0 ), Fences( 1 ),
			 Line Width( 2 ), Transparency(1.0), Fill Color(fc)
			};
);

 

An add-in can be created to do this. It could even provide a dialog, so for the specific window a Confidence Diamond could be turned on or the lower half, etc.  Below is a screen shot, of a simple Add-in with an assigned hot key sequence (Ctrl + Alt + G). This add-in would need to run once for each session or at startup.  Following this screenshot is an example of a "Before" boxplot and the boxplot "After" typing Ctrl + Alt + G while the window is highlighted.  If you can be more precise, about what you need, provide a data set and saved script/settings, an Add-In can be created that will likely work for most cases.

 

image.png

 

BeforeBeforeAfterAfter

 

EricTsai
Level III

Re: Questions regarding box plot graphics

hi gzmorgan0:
How can I get the add-in function?