cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
] />

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
bumkim
Level II

How to add a y = x reference line in Graph Builder without creating a new column?

Hi,

I’m trying to add a reference line like y = x in Graph Builder, but I’d like to do this without creating an additional column.

I know I can add constant reference lines (e.g., y = 100), but I couldn’t find a way to directly input a function like y = x or y = ax + b.

Is there any way to add a function-based reference line directly in Graph Builder?
Or is using a new formula column or a graphics script the only option?

Thanks in advance!

4 REPLIES 4
jthi
Super User

Re: How to add a y = x reference line in Graph Builder without creating a new column?

Y Function()

Some examples for example here (right click on graph > customize > +)

jthi_0-1776416584384.png

 

-Jarmo
txnelson
Super User

Re: How to add a y = x reference line in Graph Builder without creating a new column?

You can easily create a virtual column in Graph Builder and then use it in the graph.

Right click in the Column selection window and select "Formula". 

txnelson_0-1776416914906.png

Set the formula to the column that is going to be your X column in the graph

txnelson_1-1776417057218.png

Click OK and your new virtual column will be displayed

txnelson_2-1776417135889.png

Now just drag you X column to the X drop area, and your Y column and the new virtual column to the Y drop area and you will have your graph.

txnelson_3-1776417286513.png

 

Jim
ih
Super User (Alumni) ih
Super User (Alumni)

Re: How to add a y = x reference line in Graph Builder without creating a new column?

Adding to @txnelson's suggestion, note that you can rename the formula column (right click the name after building it), and then add a line chart element (right click in the graph space, add, line), and then hide the points on the 1:1 line and hide the line on the x variable (see screenshot) so you get a clean looking graph:

ih_2-1776438323504.png

 

 

shampton82
Level VII

Re: How to add a y = x reference line in Graph Builder without creating a new column?

Here a script to do it for a single frame chart

Recommended Articles