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
WetlandWoman
Level II

How to change colour of group x axes lines?

Hi!

I am currently attempting to change the axis line colours in Graph Builder on JMP version 17. I essentially would like to change the Y and X axes' lines to black and the Group X axis lines to red.

 

I have gotten the Y and X axes to be black by making the graph frame black, but then I do not want the outermost right and top lines black too. I also cannot seem to find the Group X axis settings, despite right-clicking it.

 

I have attached a sort of mock-up of lines I added after the fact on powerpoint with arrows indicating the axes I mean.

Any help would be much appreciated.

JMP Chart query.png

 

 

Thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to change colour of group x axes lines?

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.
    • Jed_Campbell_0-1688740374648.png

       

  • 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.
    • Jed_Campbell_1-1688740432402.png

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" ) )
		)
	)
);

View solution in original post

3 REPLIES 3

Re: How to change colour of group x axes lines?

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.
    • Jed_Campbell_0-1688740374648.png

       

  • 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.
    • Jed_Campbell_1-1688740432402.png

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" ) )
		)
	)
);
WetlandWoman
Level II

Re: How to change colour of group x axes lines?

Hi Jed,

Thank you so much for the help. The reference lines worked perfectly! I also found in the Preferences window for Graphs if I set the Frame colour as black, but turned the graph frame off (unticked the box), that made the y and x axes black only (not intuitive - but it worked).

Cheers!

hogi
Level XII

Re: How to change colour of group x axes lines?

JSL option for the GroupX area color:  Grid Color().

 

dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt << Graph Builder(
	Show Control Panel( 0 ),
	Grid Color( "Red" ),
	Graph Spacing( 4 ),
	Variables( X( :sex ), Group X( :age ) ),
	Elements( Bar( X, Legend( 6 ) ) )
)

hogi_0-1688890903013.png