Hi All,
Running JMP/JMP Pro on windows 11 machines.
I am curious how to get around a very specific kind of problem -- and do it automatically (not manually). As an example, I am using the Air.jmp sample data table to show the issue at hand. I've attached a copy of the files with the script to show the problem.
I have a data table where I'm adding data to it daily (sometimes weekly), and I have a built in script in the data table to plot data vs date. To mimic this, I split the Air.jmp data table into two halves and made the graph builder graph and then concatenated the "new" (second half of the data) to the first half of the other table and re-ran the script.
Ideally I'd like to get an output where the graph builder date x-axis is automatically scaled to the most recent date, like this:
Instead, I get a graph where it only updates to the value of when I saved the last version of that graph builder script to the data table. So, the output looks like this:
This doesn't happen when you just graph the data points and don't modify the increment of the axis. The default increment on the axis for this data set (the first half) is 2 years. After you add the second half of the data, and rerun the script in the data table, it resets the default to 5 years and graphs all the data.
However, if you change the default increment to 1 Month, for example, and save the script to the data table (first half), then add the new data and re-run the script, it keeps the axis settings the same as the original script -- it doesn't update to include the new data. The big difference in the script is the SendToReport command:
SendToReport(
Dispatch(
{},
"date",
ScaleBox,
{Min( 1597574016 ), Max( 1925078400 ), Interval( "Month" ), Inc( 1 ),
Minor Ticks( 1 )}
)
)
In this command, there are the Min() and Max() date settings which are modified by the existing date range of the original data table. I'm not sure why this limitation is there and isn't updated to reflect new dates that are added to a data table and the script is re-run.
Is there a way to get around this while maintaining the Month interval and also having the x-axis nested so that the months are also grouped in years? After adding new data to the table and re-running the script, I'd like the new graph to use the Min() and Max() settings from the latest data table, not from the original.
Hopefully there's an easy fix for this. Otherwise, I think I'll put in a wish-list request that this is changed to allow for the Min() and Max() inputs for the axis to be updated automatically by the current values within the relevant column of the data table.
Thanks in advance for any thoughts/feedback!,
DS