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
mdawson69
Level IV

Lock scales independently in Graph Builder

In Graph Builder there is an option to lock scales in order to keep the axes from responding to data changes. In JSL, the Lock Scales function is available to do the same. In both the UI and JSL, locking scales affects both the x and y axes. Is there a way to lock the axis scales independently? I have a script, actually several, that generate graphs with Graph Builder, but that also open Data Filter windows so that we can filter the graph just as we do in the software we are developing for a client; JMP is being used to verify the software's reporting features. All of these graphs are fixed to show a 24-hour period (midnight to midnight one day at a time), but the y-axis should properly adapt to the scale of the data.

Unlike our software, which populates time intervals with no activity with zeros by default, JMP only shows data points where data exists. That is, I am using an event log output from the software and verifying that the software's reporting matches what I produce in JMP using the event log. If an event did not occur at a certain time, there is no entry in the event log for that time; more correctly, when I bin the data, time intervals for which there is no data are not created. Due to this, sometimes the x-axis will scale to a time range based on the available data. That behavior is problematic when trying to compare the graph JMP creates to the graph generated by our software.

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Level X

Re: Lock scales independently in Graph Builder

As an alternative to tinkering with the Graph Builder report, you could assign an 'axis' property to the variables you want to graph:

http://www.jmp.com/support/help/Expression_Data.shtml

View solution in original post

5 REPLIES 5
mdawson69
Level IV

Re: Lock scales independently in Graph Builder

Wow, did I stump everyone? Or maybe this just got lost in the discussion list.

Re: Lock scales independently in Graph Builder

One way you can do this would be to use the filter to exclude the undesired rows. If you include the following code in your Graph Builder() script (assuming the time column is continuous and called x) it should have the desired effect but requires setting the graph builder to update each time the filter is altered.

SendToReport(

  Dispatch(

   {},

   "x",

   ScaleBox,

   {Min( col min(:x) ), Max( col min(:x)+86400 ), Interval( "Day" ), Inc( 1 ), Minor Ticks( 0 )}

  )

)

You will probably also need to include an if statement prior to the to graph builder to handle when all rows of x are excluded.

mdawson69
Level IV

Re: Lock scales independently in Graph Builder


stephen.pearson wrote:



One way you can do this would be to use the filter to exclude the undesired rows.


Actually, there would not be any undesired rows. The issue arises from there often being fewer data points than time bins. Our data is binned into 96 15-minute intervals. In the test model I have no one arrives in the system prior to 6:30 AM. When the script builds the graph, the x-axis is set up to be midnight to midnight, so there is no issue. The problem is that when I change filtering parameters, say to a location where events only occurred from 6:45 AM to 10:30 PM, those times effectively become the extremes of the x-axis.

Also, the script has completed execution once the user can start changing the filter settings to review various outputs. My scripts are not add-ins or JSL apps—I'm not there yet—so it does not continue running after the graph is rendered with the initial filter conditions. Ultimately, I had to backfill the empty bins with zeros in order to prevent comparison issues between what the software I am testing reports and what JMP reports. As such, all 96 time bins are always populated and the issue of the x-axis changing resolved itself. That stated, you have given me some things to consider for future work.

ian_jmp
Level X

Re: Lock scales independently in Graph Builder

As an alternative to tinkering with the Graph Builder report, you could assign an 'axis' property to the variables you want to graph:

http://www.jmp.com/support/help/Expression_Data.shtml

mdawson69
Level IV

Re: Lock scales independently in Graph Builder

Setting the Axis property for a column definitely looks like a fix to my problem. In my response to stephen.pearson I noted that due to another issue that I needed to address, this issue has self-resolved, but having knowledge of the Axis property for columns is definitely helpful.