title: Separating Data in BOXPLOTPARAM (SAS GTL)
body: <p>I have summarized data that I want to plot as box and whisker plots.  I have added an &quot;outlier&quot; point to certain classes.  I would like 2 separate plots, one with outliers and one without.</p>
  <p>Here's what I've got:</p>
  <pre><code>data test;
  input _stat_ $ _label_ $ col1 has_outlier;
  datalines;
  Max    A 2.1837546442 0
  Mean   A 0            0
  Median A 0.0101415946 0
  Min    A -2.698021137 0
  Q1     A -0.656874482 0
  Q3     A 0.6635898047 0
  Max    B 2.2346071965 1
  Mean   B 0            1
  Median B -0.025621533 1
  Min    B -2.380132327 1
  Q1     B -0.658781626 1
  Q3     B 0.7248025307 1
  Outlier B -2.120639115 1
  Max    C 1.9904289904 0
  Mean   C 0            0
  Median C 0.0164299847 0
  Min    C -2.032578831 0
  Q1     C -0.454702942 0
  Q3     C 0.7259160175 0
  ;
  
  
  
  proc template;
    define statgraph boxplotparm1;
      begingraph;
        layout datapanel classvars=(has_outlier) / columns=2 rowdatarange=union;
            layout prototype / cycleattrs=true;
             boxplotparm x=_label_ y=col1 stat=_stat_ /
               datalabel=datalabel spread=true  dataskin=sheen outlierattrs=(color=red symbol=Asterisk);     
            endlayout;
        endlayout;
      endgraph;
    end;
  run;
   
  /* Generate the plot. */
  proc sgrender data=test template=boxplotparm1;
  run;
  </code></pre>
  <p>Producing this:
  <a href="https://i.stack.imgur.com/0xcDS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0xcDS.png" alt="enter image description here" /></a></p>
  <p>I would like to remove the classes from the charts where there is no box plot.  So the &quot;No Outlier&quot; group should only show &quot;A&quot; and &quot;C&quot; and the &quot;Outlier&quot; group should only show &quot;B&quot;.</p>