<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Overlaying on a Boxplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30941#M939</link>
    <description>You're awesome! &lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
    <pubDate>Thu, 03 Jun 2010 16:37:40 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-06-03T16:37:40Z</dc:date>
    <item>
      <title>Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30934#M932</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I was wondering if a boxplot can be overlay be by another boxplot(s)? &lt;BR /&gt;
&lt;BR /&gt;
I have three groups and two time points in my data and would like to get a graphical presentation on the change in measurement on each group. The measurement is on y-axis, time on x-axis with the three groups superimpose on each other. Ideally, the graph will have six bars; three on time-point 1 and three on time-point 2 with a median connection between bars for each group.&lt;BR /&gt;
&lt;BR /&gt;
I am using PROC SGPLOT and VBOX statement to generate the boxplot but can't find the right options/ method to get the desire graph. My alternative approach was to using PROC SGPANEL with PANELBY (group) and VBOX statements, but that doesn't help to stack/ overlay the groups. Although the PROC BOXPLOT procedure has more options to customized the graph, but I was not sure (1) if I can overlay bars on a boxplot and (2) if that support ODS GRAPH function. &lt;BR /&gt;
&lt;BR /&gt;
My best guess is to customized the graph in PROC TEMPLATE procedure, but I am not familiar on that and would like to get some help on that.&lt;BR /&gt;
&lt;BR /&gt;
If someone could also let me know the code to remove the whisker and outliers on the boxplot, I would really appreciate it.&lt;BR /&gt;
&lt;BR /&gt;
Thank you very much!&lt;BR /&gt;
&lt;BR /&gt;
P.S.: My machine is running SAS v9.2 (TS2M2).</description>
      <pubDate>Wed, 02 Jun 2010 20:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30934#M932</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-02T20:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30935#M933</link>
      <description>I am also not quite sure about this too.&lt;BR /&gt;
&lt;BR /&gt;
normally, i do not use SAS to generate graphs for me. i copy the results to excel or other software that designed for graphs, which can let me adjust the graphs more freely...&lt;BR /&gt;
&lt;BR /&gt;
actually, i have the similar question as yours.....</description>
      <pubDate>Thu, 03 Jun 2010 03:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30935#M933</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-03T03:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30936#M934</link>
      <description>Here is a simple  GTL example of overlaid boxplots:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc template;&lt;BR /&gt;
define statgraph boxplots;&lt;BR /&gt;
begingraph;&lt;BR /&gt;
layout overlay;&lt;BR /&gt;
     boxplot y=weight x=age / datatransparency=0.5 fillattrs=GraphData1 &lt;BR /&gt;
                                           name="box1" legendlabel="Weight";&lt;BR /&gt;
     boxplot y=height x=age / datatransparency=0.5 fillattrs=GraphData2 &lt;BR /&gt;
                                          name="box2" legendlabel="Height" yaxis=y2;&lt;BR /&gt;
     discreteLegend "box1" "box2";&lt;BR /&gt;
endlayout;&lt;BR /&gt;
endgraph;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sgrender data=sashelp.class template=boxplots; run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 03 Jun 2010 04:59:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30936#M934</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-06-03T04:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30937#M935</link>
      <description>Great thanks!!&lt;BR /&gt;
&lt;BR /&gt;
One more question, I was trying to further modify the style and was not sure where/ how to add the following code:&lt;BR /&gt;
&lt;BR /&gt;
style GraphBox / capstyle="Line" connect="Median" displayopts="Fill Caps Median Mean Outliers"&lt;BR /&gt;
&lt;BR /&gt;
Thanks again!</description>
      <pubDate>Thu, 03 Jun 2010 15:12:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30937#M935</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-03T15:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30938#M936</link>
      <description>You can either put that information in the style or directly in your template. For example, if you put these three options on each of the boxplots, you'll get what you want:&lt;BR /&gt;
&lt;BR /&gt;
capstyle=line connect=median display=(fill caps median mean outliers connect)&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
      <pubDate>Thu, 03 Jun 2010 15:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30938#M936</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-06-03T15:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30939#M937</link>
      <description>Any chance that I can remove the whisker lines (and how)?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Thu, 03 Jun 2010 16:29:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30939#M937</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-03T16:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30940#M938</link>
      <description>Try this and see if it works for you:&lt;BR /&gt;
&lt;BR /&gt;
whiskerattrs=(thickness=0)&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
      <pubDate>Thu, 03 Jun 2010 16:33:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30940#M938</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-06-03T16:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30941#M939</link>
      <description>You're awesome! &lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Thu, 03 Jun 2010 16:37:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30941#M939</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-03T16:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30942#M940</link>
      <description>Actually, I think if you remove "caps" from your display list, you'll get the same effect.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
      <pubDate>Thu, 03 Jun 2010 16:42:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30942#M940</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-06-03T16:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30943#M941</link>
      <description>Removing the "caps" doesn't help, but leaving the vertical lines on the graph.&lt;BR /&gt;
&lt;BR /&gt;
The values of my box (Q1, median, Q3) range between 10 to 70 and I was trying to adjust the y-axis label by the following:&lt;BR /&gt;
&lt;BR /&gt;
layout overlay / yaxisopts=(label="Outcome"&lt;BR /&gt;
	       linearopts=(tickvaluesequence=(start=0 end=70 increment=10))) ;&lt;BR /&gt;
&lt;BR /&gt;
There are some 80+ outlier values in my data which I don't want to show on the graph by removing the "outlier" in the display list.&lt;BR /&gt;
&lt;BR /&gt;
Now the y-axis has the correct tick values, but it only occupies about half of the y-axis and leaving (upper) half of the graph area in blank. &lt;BR /&gt;
&lt;BR /&gt;
Am I missing something?&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Thu, 03 Jun 2010 17:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30943#M941</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-03T17:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30944#M942</link>
      <description>The way you are specifying your tick values allows the dataspace to include the data range of your outliers. That is your "blank" space. There are two options:&lt;BR /&gt;
&lt;BR /&gt;
1. If you only want to see the extreme outliers, use LABELFAR=TRUE on the BOXPLOT statement.&lt;BR /&gt;
&lt;BR /&gt;
2. If you want no outliers and do not want their data space, use VIEWMIN=0 and VIEWMAX=70 on the axisopts instead of the tick value sequence option.&lt;BR /&gt;
&lt;BR /&gt;
Let me know if that works for you.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
      <pubDate>Thu, 03 Jun 2010 18:53:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30944#M942</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-06-03T18:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30945#M943</link>
      <description>The viewmin and viewmax work perfect for me.&lt;BR /&gt;
&lt;BR /&gt;
Is there a way to spread the bars a little bit to avoid overlap? &lt;BR /&gt;
&lt;BR /&gt;
There is SPREAD= option for outliers, but was wondering if there is one for the bars?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Thu, 03 Jun 2010 19:21:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30945#M943</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-03T19:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30946#M944</link>
      <description>In the SAS v9.2m3,  there is a way. However, to simulate that in v9.2TS2, you would need to use SGPANEL and make those previously mentioned box customizations in an ODS style.&lt;BR /&gt;
&lt;BR /&gt;
Dan</description>
      <pubDate>Thu, 03 Jun 2010 19:27:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30946#M944</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-06-03T19:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30947#M945</link>
      <description>I appreciate your support very much. Thanks!</description>
      <pubDate>Thu, 03 Jun 2010 19:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30947#M945</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-03T19:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30948#M946</link>
      <description>not totally understand. But packed away..  &lt;BR /&gt;
&lt;BR /&gt;
Thanks! try to learn it.</description>
      <pubDate>Fri, 04 Jun 2010 01:53:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30948#M946</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-04T01:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying on a Boxplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30949#M947</link>
      <description>thank you for all your help!!&lt;BR /&gt;
____________________&lt;BR /&gt;
&lt;A href="http://www.topbrandcigars.com" target="_blank"&gt;cohiba cigars&lt;/A&gt;</description>
      <pubDate>Fri, 18 Jun 2010 13:11:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-on-a-Boxplot/m-p/30949#M947</guid>
      <dc:creator>Gary45</dc:creator>
      <dc:date>2010-06-18T13:11:40Z</dc:date>
    </item>
  </channel>
</rss>

