I've dug through the Scripting Guide looking for a way to "break" the linkage between the data displayed in an overlay plot and its' data table but can't seem to find out how to do this. The reason is that I want to create multiple OPs with various user specified date ranges of data. I'm using a data filter to select the date ranges I'm interested in so that the resultant OPs can autoscale the x and y axis data so that I don't have to specify these parameters since they dramatically change over the year.
To simplify the issue I've included some mocked up code below that is basically showing what I'm trying to accomplish: Namely, create 2 OPs that show data for Months 1-3 AND 5-7 and have each of these OPs be unlinked from the original data so that as the data selected from the data filter changes, the data shown in the OP doesn't change from what was originally specified. Any suggestions on how to accomplish this would be greatly appreciated.
Clear Log();
dt = Open( "C:\Program Files\SAS\JMP\10\Samples\Data\Time Series\Raleigh Temps.JMP" );
sdate = 1;
edate = 3;
obj = dt << Data Filter(
Auto Clear ( 1 ),
Show Window ( 0 ),
Add Filter(
columns( :Name( "Month" ) ),
Where(
:Name( "Month" ) >= sdate & :Name( "Month" ) <=
edate
)
),
Mode( Show( 1 ), Include( 1 ) )
);
obj << Close;
Overlay Plot(
X( :Name( "Month" ) ),
Y( :Name( "Temperature" ) ),
Separate Axes( 1 ),
Connect Thru Missing( 1 ),
Connect Points( 1 ),
SendToReport(
Dispatch(
{},
"101",
ScaleBox,
{Show Major Grid( 1 ), Rotated Labels( "Automatic" )}
)
)
);
sdate = 5;
edate = 7;
obj = dt << Data Filter(
Auto Clear ( 1 ),
Show Window ( 0 ),
Add Filter(
columns( :Name( "Month" ) ),
Where(
:Name( "Month" ) >= sdate & :Name( "Month" ) <=
edate
)
),
Mode( Show( 1 ), Include( 1 ) )
);
obj << Close;
Overlay Plot(
X( :Name( "Month" ) ),
Y( :Name( "Temperature" ) ),
Separate Axes( 1 ),
Connect Thru Missing( 1 ),
Connect Points( 1 ),
SendToReport(
Dispatch(
{},
"101",
ScaleBox,
{Show Major Grid( 1 ), Rotated Labels( "Automatic" )}
)
)
);