<?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: SAS Box plots adding an overlay in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/275828#M9847</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/85267"&gt;@mgm&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Something along the following lines &amp;nbsp;?&amp;nbsp;&lt;A href="http://support.sas.com/resources/papers/proceedings12/285-2012.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings12/285-2012.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/85267"&gt;@mgm&lt;/a&gt; It is a good idea to post code in the Code box opened using the SAS "Run" icon to reduce poorly formatted posts.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2016 22:42:12 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-06-07T22:42:12Z</dc:date>
    <item>
      <title>SAS Box plots adding an overlay</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/275812#M9844</link>
      <description>&lt;P&gt;I'm using the following code to &amp;nbsp;create box plots&amp;nbsp;and&amp;nbsp;I would like to overlay the boxplot output with a specific point in the distribution(e.g. most recent value ) in order to show where we stand currently versus the historical distribution. &amp;nbsp;Is there a way to easily highlight a specific value in the box plot.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sort data = Regionbets ; by region; run;&lt;BR /&gt;ods path reset;&lt;BR /&gt;ODS path show;&lt;BR /&gt;ods path(prepend) work.templat(update);&lt;/P&gt;&lt;P&gt;proc template;&lt;BR /&gt;define statgraph boxplot;&lt;BR /&gt;begingraph;&lt;BR /&gt;entrytitle "Country bets ";&lt;BR /&gt;layout overlay;&lt;BR /&gt;boxplot y=actweight x=region/&lt;BR /&gt;datalabel=make spread=true;&lt;BR /&gt;endlayout;&lt;BR /&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sgrender data=Regionbets template=boxplot;&lt;BR /&gt;label Region="test regions"&lt;BR /&gt;label actweight="Active";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 21:26:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/275812#M9844</guid>
      <dc:creator>mgm</dc:creator>
      <dc:date>2016-06-07T21:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Box plots adding an overlay</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/275821#M9845</link>
      <description>&lt;P&gt;Probably the most straighfroward way it to overlay a scatterplot on the boxplot and set the marker symol different from the outlier markers.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 22:15:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/275821#M9845</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-06-07T22:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Box plots adding an overlay</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/275824#M9846</link>
      <description>&lt;P&gt;Something along the following lines &amp;nbsp;?&amp;nbsp;&lt;A href="http://support.sas.com/resources/papers/proceedings12/285-2012.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings12/285-2012.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.cars; by DRIVETRAIN; run; data cars2; set sashelp.cars; if DRIVETRAIN="All" then ALL=-1+0.1*rannor(0); if DRIVETRAIN="Front" then FRONT=1.5+0.1*rannor(0); if DRIVETRAIN="Rear" then REAR=4+0.1*rannor(0); run; proc template; define statgraph mygraphs.example5; begingraph; layout overlay / x2axisopts=(display=(line) linearopts=(viewmin=-1 viewmax=4)); boxplot x=DRIVETRAIN y=MPG_CITY / display=(caps mean median) fillattrs=(color=white); scatterplot x=ALL y=MPG_CITY / xaxis=x2 markerattrs=(color=blue); scatterplot x=FRONT y=MPG_CITY / xaxis=x2 markerattrs=(color=red); scatterplot x=REAR y=MPG_CITY / xaxis=x2 markerattrs=(color=green); endlayout; endgraph; end; run; Figure 6b&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Jun 2016 22:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/275824#M9846</guid>
      <dc:creator>mgm</dc:creator>
      <dc:date>2016-06-07T22:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Box plots adding an overlay</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/275828#M9847</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/85267"&gt;@mgm&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Something along the following lines &amp;nbsp;?&amp;nbsp;&lt;A href="http://support.sas.com/resources/papers/proceedings12/285-2012.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings12/285-2012.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/85267"&gt;@mgm&lt;/a&gt; It is a good idea to post code in the Code box opened using the SAS "Run" icon to reduce poorly formatted posts.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 22:42:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/275828#M9847</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-07T22:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Box plots adding an overlay</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/275834#M9848</link>
      <description>&lt;P&gt;Yes, something like that. From your initial description, my expectation is that you will have one scatter point per box. Using your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data = Regionbets ; by region; run;
ods path reset;
ODS path show;
ods path(prepend) work.templat(update);
proc template;
define statgraph boxplot;
begingraph;
   entrytitle "Country bets ";
   layout overlay;
      boxplot y=actweight x=region / datalabel=make spread=true;
      scatterplot y=curpoint x=region2 / markerattrs=(symbol=starfilled);
   endlayout;
endgraph;
end;
run;
proc sgrender data=Regionbets template=boxplot;
label Region="test regions"
label actweight="Active";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where "curpoint" contains the current points for each box, and "region2" is the corresponding region value for the point. THese two columns should be merged with your original data into a "merged" data set using a DATA step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 00:05:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/275834#M9848</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-06-08T00:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Box plots adding an overlay</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/278208#M9901</link>
      <description>&lt;P&gt;There have been several discussions recently about overlaying scatter plots or series plots on box plots. &amp;nbsp;I've summarized some of my thoughts and presented some examples on my blog:&lt;/P&gt;
&lt;P&gt;1. &lt;A href="http://blogs.sas.com/content/iml/2016/06/13/overlay-box-plot-in-sas-discrete.html" target="_self"&gt;Overlay plots on a box plot in SAS: Discrete X axis&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;2. &lt;A href="http://blogs.sas.com/content/iml/2016/06/15/overlay-box-plot-sas-continuous.html" target="_self"&gt;Overlay plots on a box plot in SAS: Continuous X axis&lt;/A&gt;&lt;/P&gt;
&lt;DIV id="wrapper" class="hfeed"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 17 Jun 2016 14:56:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Box-plots-adding-an-overlay/m-p/278208#M9901</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-06-17T14:56:48Z</dc:date>
    </item>
  </channel>
</rss>

