- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Subset window of variability chart's by tree structure into subsetted window in JSL
Hi all,
I am running into an issue with my script after I created a dynamic variability chart of approximately 30 charts but want to subset a small amount into another window but am unable to do so. For company policy I can't post the code but have used an example of what I am trying to do using JMP Sample Data as seen below.
dt = Open("C:\Program Files\SAS\JMP\17\Samples\Data\Quality Control\Braces.jmp");
vc = Variability Chart(
Y( :"# defects"n ),
Model( "Main Effect" ),
X( :Date ),
Variability Analysis(
:"# defects"n,
Show Range Bars( 0 ),
Show Cell Means( 0 ),
Std Dev Chart( 0 )
),
By( :Unit size )
);
subset_vc = New Window("Only some vc", vlis = V List Box());
frameboxes_to_subset = {1, 3, 5}; // Want to get when unit size = 4, 8, 12
vc_rpt = vc << Report;
show(N Items( (vc_rpt << XPath( "//FrameBox" )) ));
structure = vc_rpt << Show tree structure;
for(i = 1, i <= N Items(frameboxes_to_subset), i++,
vlis << append(vc_rpt[FrameBox(frameboxes_to_subset[i])]);
);
I am able to see in the log that the original vc_rpt has 6 Frameboxes as expected, but when I try to subset them based on the Framebox number seen in the "show tree structure", no graph is appended. I have also tried wrapping it in an additional V List Box and similarly nothing has worked to add to the new window. Any help would be greatly appreciated. Thanks!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Subset window of variability chart's by tree structure into subsetted window in JSL
Your error is in thinking that all of the images are in one report. Instead, there are 6 reports, each with one image.
Therefore your code needs to be changed to looping through a specified report and grabbing framebox(1) from each report.
dt = Open("C:\Program Files\SAS\JMP\17\Samples\Data\Quality Control\Braces.jmp");
vc = Variability Chart(
Y( :"# defects"n ),
Model( "Main Effect" ),
X( :Date ),
Variability Analysis(
:"# defects"n,
Show Range Bars( 0 ),
Show Cell Means( 0 ),
Std Dev Chart( 0 )
),
By( :Unit size )
);
subset_vc = New Window("Only some vc", vlis = V List Box());
frameboxes_to_subset = {1, 3, 5}; // Want to get when unit size = 4, 8, 12
vc_rpt = vc << Report;
//show(N Items( (vc_rpt << XPath( "//FrameBox" )) ));
//structure = vc_rpt << Show tree structure;
for(i = 1, i <= N Items(frameboxes_to_subset), i++,
vlis << append(vc_rpt[frameboxes_to_subset[i]][FrameBox(1)]);
);
I am also thinking that you might not want to be pulling just the FrameBox(), but instead pulling the PictureBox()
subset_vc = New Window("Only some vc", vlis = V List Box());
frameboxes_to_subset = {1, 3, 5}; // Want to get when unit size = 4, 8, 12
vc_rpt = vc << Report;
//show(N Items( (vc_rpt << XPath( "//FrameBox" )) ));
//structure = vc_rpt << Show tree structure;
for(i = 1, i <= N Items(frameboxes_to_subset), i++,
vlis << append(vc_rpt[frameboxes_to_subset[i]][PictureBox(1)]);
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Subset window of variability chart's by tree structure into subsetted window in JSL
Your error is in thinking that all of the images are in one report. Instead, there are 6 reports, each with one image.
Therefore your code needs to be changed to looping through a specified report and grabbing framebox(1) from each report.
dt = Open("C:\Program Files\SAS\JMP\17\Samples\Data\Quality Control\Braces.jmp");
vc = Variability Chart(
Y( :"# defects"n ),
Model( "Main Effect" ),
X( :Date ),
Variability Analysis(
:"# defects"n,
Show Range Bars( 0 ),
Show Cell Means( 0 ),
Std Dev Chart( 0 )
),
By( :Unit size )
);
subset_vc = New Window("Only some vc", vlis = V List Box());
frameboxes_to_subset = {1, 3, 5}; // Want to get when unit size = 4, 8, 12
vc_rpt = vc << Report;
//show(N Items( (vc_rpt << XPath( "//FrameBox" )) ));
//structure = vc_rpt << Show tree structure;
for(i = 1, i <= N Items(frameboxes_to_subset), i++,
vlis << append(vc_rpt[frameboxes_to_subset[i]][FrameBox(1)]);
);
I am also thinking that you might not want to be pulling just the FrameBox(), but instead pulling the PictureBox()
subset_vc = New Window("Only some vc", vlis = V List Box());
frameboxes_to_subset = {1, 3, 5}; // Want to get when unit size = 4, 8, 12
vc_rpt = vc << Report;
//show(N Items( (vc_rpt << XPath( "//FrameBox" )) ));
//structure = vc_rpt << Show tree structure;
for(i = 1, i <= N Items(frameboxes_to_subset), i++,
vlis << append(vc_rpt[frameboxes_to_subset[i]][PictureBox(1)]);
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Subset window of variability chart's by tree structure into subsetted window in JSL
Thanks Jim,
Interesting, will read up on that as I thought a window represented a "page" of a journal such that there would only be one. Appreciate the help!