cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
EDM
EDM
Level II

2 problems with setting variable reference lines on an X/Y plot

Hi,

 

I've attached a script which aims to add (variable) red reference lines on an X/Y plot, based on the median Y value for rows of data within a given group (the group variable is set to control the page) and an additional criteria in another column.

 

Summary of important columns:

X Column

Y Column

Group Column

Criteria Column

 

When I initially wrote this script it did partially work, as in, the red lines were drawn onto each frame box as intended, however the values were not correct. The first frame box was assigned red reference lines of the correct value, however all other scale boxes had matching red reference lines of different value to the first scale box (Problem 1).

The script worked like this until I closed JMP / certain JMP windows. The script now won't draw the red reference lines at all (Problem 2). 

 

Expanding on Problem 1:

When the script was partially working, although (i) seems to be incrementing correctly in the For loop, the (i)'s within the formula to calculate the red reference lines was not updating per loop, or not being seen.

 

I have a list (page_list[]) containing the different groups which control the page - this list was generated in the script used to build the data table the graph script (attached) is running from and lists the unique values in that column, i.e. each group.

 

I'm a bit stuck, so was hoping someone with more expertise than myself could help. I'm fairly new to scripting in JSL, but I'm giving it a good go!

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: 2 problems with setting variable reference lines on an X/Y plot

Without having access to data debugging the script is fairly difficult as it takes a lot of time to create mockup data or refactor the script to work with some of JMP's sample datasets.

But I do have one suggestion: as you seem to be using Page so I guess your data is in tall format and if this is the case you could maybe calculate new columns to your data table which would have those limits. Then you can add those new columns to Y-axis as line plots (disable them from points plot and disable y-axis variables used in points from the lines).

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: 2 problems with setting variable reference lines on an X/Y plot

Without having access to data debugging the script is fairly difficult as it takes a lot of time to create mockup data or refactor the script to work with some of JMP's sample datasets.

But I do have one suggestion: as you seem to be using Page so I guess your data is in tall format and if this is the case you could maybe calculate new columns to your data table which would have those limits. Then you can add those new columns to Y-axis as line plots (disable them from points plot and disable y-axis variables used in points from the lines).

-Jarmo
EDM
EDM
Level II

Re: 2 problems with setting variable reference lines on an X/Y plot

Thanks Jarmo,

I was able to put something together based on the alternative approach you suggested: new data columns, plotted as lines, acting as reference lines.

Great suggestion!