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

Adding a Horizontal Reference Line With Color and Thickness Adjustment

Hi,

 

I am novice user of JMP. When creating a graph, I know I can add a horizontal line using this method:

 

  1. Right-click in one of the plots and select Customize.
  2. Click Add (plus sign).
  3. Type H Line( Y ), where the Y argument is the value for the reference line.
  4. Click OK

But what is the script for choosing thickness and how do I change the color of that line.

Right now, I have thin black line:

HCC_0-1632099471943.png

 

Many thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: Adding a Horizontal Reference Line With Color and Thickness Adjustment

Add:

Pen Size( 2 );
Pen Color( red );

with of course your thickness and color.

These commands are all documented in the Scripting Guide and Scripting Index.

I strongly suggest you read the Scripting Guide, and that you familiarize yourself with the Scripting Index.  It will make your journey into JMP fare more pleasant and more productive.

Jim

View solution in original post

Thierry_S
Super User

Re: Adding a Horizontal Reference Line With Color and Thickness Adjustment

Hi,

You will need to add a couple of commands before the H Line (Y) command:

  • Pen size (3) (or any size in pixel you would like)
  • Pen color (blue) (or whatever color recognized by JMP)
  • Line Style ("Dotted") (or "Solid", "Dashed")

I hope it helps.

Best,

TS

Thierry R. Sornasse

View solution in original post

6 REPLIES 6
txnelson
Super User

Re: Adding a Horizontal Reference Line With Color and Thickness Adjustment

Add:

Pen Size( 2 );
Pen Color( red );

with of course your thickness and color.

These commands are all documented in the Scripting Guide and Scripting Index.

I strongly suggest you read the Scripting Guide, and that you familiarize yourself with the Scripting Index.  It will make your journey into JMP fare more pleasant and more productive.

Jim
HCC
HCC
Level II

Re: Adding a Horizontal Reference Line With Color and Thickness Adjustment

Thanks for solution. I'll take a look at the scripting guide.

Thierry_S
Super User

Re: Adding a Horizontal Reference Line With Color and Thickness Adjustment

Hi,

You will need to add a couple of commands before the H Line (Y) command:

  • Pen size (3) (or any size in pixel you would like)
  • Pen color (blue) (or whatever color recognized by JMP)
  • Line Style ("Dotted") (or "Solid", "Dashed")

I hope it helps.

Best,

TS

Thierry R. Sornasse
HCC
HCC
Level II

Re: Adding a Horizontal Reference Line With Color and Thickness Adjustment

Thank you for your solution.

Re: Adding a Horizontal Reference Line With Color and Thickness Adjustment

Hello @HCC,

This is more for your own information and for those who do not script.  You can add a reference line by right clicking on the axis of choice and select Axis Settings.  The lower right corner of the UI is dedicated to adding reference lines including thickness and color.

 

HTH

Bill

gail_massari
Community Manager Community Manager

Re: Adding a Horizontal Reference Line With Color and Thickness Adjustment

Plus, @HCC , re: Bill @Bill_Worley descibiing interactive approach, please remember that most of what you do interactively you can save to script and then edit/incorproate the saved JSL into other scripts.