Here's one way, but there might be better ways.
- Red lines between groups can be added as reference lines in the X axis settings. I found the number 1.485 with a little experimentation. I think 1.5 would have been the natural border, but at that point the line didn't show up, so this is just shy of the border. You may need to adjust this with a different number of categories.
- I used the line tool to draw the black line on the Y axis, then I cheated a bit by sending the graph to the script window and making sure the x,y coordinates lined up well.
Here's a script to recreate what I did.
/*JMP STATISTICAL DISCOVERY LLC (“JMP”) PERMITS THE USE OF THIS COMPUTER SOFTWARE CODE (“CODE”) ON AN AS-IS BASIS AND AUTHORIZES YOU TO USE THE CODE SUBJECT TO THE TERMS LISTED HEREIN. BY USING THE CODE, YOU AGREE TO THESE TERMS. YOUR USE OF THE CODE IS AT YOUR OWN RISK. JMP MAKES NO REPRESENTATION OR WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRIGEMENT, AND TITLE, WITH RESPECT TO THE CODE.
You may use the Code solely as part of a software product you currently have licensed from JMP, JMP’s parent company SAS Institute Inc. (“SAS”), or one of JMP’s or SAS’s subsidiaries or authorized agents (the “Software”), and not for any other purpose. The Code is designed to add functionality to the Software but has not necessarily been tested. Accordingly, JMP makes no representation or warranty that the Code will operate error-free. JMP is under no obligation to maintain, support, or continue to distribute the Code.
Neither JMP nor its licensors shall be liable to you or any third-party for any general, special, direct, indirect, consequential, incidental, or other damages whatsoever arising out of or related to your use or inability to use the Code, even if JMP has been advised of the possibility of such damages. Except as otherwise provided above, the Code is governed by the same agreement that governs the Software. If you do not have an existing agreement with JMP or SAS governing the Software, you may not use the Code.
JMP and all other JMP Statistical Discovery LLC product or service names are registered trademarks or trademarks of JMP Statistical Discovery LLC in the USA and other countries. ® indicates USA registration. Other brand and product names are registered trademarks or trademarks of their respective companies.
*/
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt << Graph Builder(
Size( 633, 672 ),
Show Control Panel( 0 ),
Variables( X( :sex ), Group X( :age ) ),
Elements( Bar( X, Legend( 6 ) ) ),
SendToReport(
Dispatch(
{},
"sex",
ScaleBox,
{Add Ref Line( 1.485, "Solid", "Red", "", 1 ),
Label Row( Tick Mark Style( "Automatic" ) )}
),
Dispatch(
{},
"Graph Builder",
FrameBox,
Add Line Annotation( Line( {1, 0}, {1, 565} ), Color( "Black" ) )
)
)
);