<?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 Plot multiple groups of boxes with decile lines in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-groups-of-boxes-with-decile-lines/m-p/96393#M3594</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There does not seem to be a straightforward way to plot multiple box/bar groups with bars separated by decile lines.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dataset with several Measures and deciles for each measure.&amp;nbsp; Here's a simulated dataset:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data d;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do Measure=1 to 5;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do i=0 to 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DecileVal = ranuni(0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop i;&lt;/P&gt;&lt;P&gt;proc rank data=d out=d;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by Measure;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var DecileVal;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ranks Decile;&lt;/P&gt;&lt;P&gt;proc sort data=d; by Measure Decile;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far the closest I get is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=d;&lt;/P&gt;&lt;P&gt;&amp;nbsp; scatter x=Measure y=DecileVal / markerattrs=(symbol=plus);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still need:&lt;/P&gt;&lt;P&gt;- Change pluses into horizontal lines&lt;/P&gt;&lt;P&gt;- To add vertical boxes that start at a Min value and end at Max.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can something like this be done in SGPlot?&amp;nbsp; I need to overlay odds ratios with CI over the bars?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate any help or pointers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Jun 2013 16:35:53 GMT</pubDate>
    <dc:creator>Haris</dc:creator>
    <dc:date>2013-06-05T16:35:53Z</dc:date>
    <item>
      <title>Plot multiple groups of boxes with decile lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-groups-of-boxes-with-decile-lines/m-p/96393#M3594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There does not seem to be a straightforward way to plot multiple box/bar groups with bars separated by decile lines.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dataset with several Measures and deciles for each measure.&amp;nbsp; Here's a simulated dataset:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data d;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do Measure=1 to 5;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do i=0 to 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DecileVal = ranuni(0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop i;&lt;/P&gt;&lt;P&gt;proc rank data=d out=d;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by Measure;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var DecileVal;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ranks Decile;&lt;/P&gt;&lt;P&gt;proc sort data=d; by Measure Decile;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far the closest I get is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=d;&lt;/P&gt;&lt;P&gt;&amp;nbsp; scatter x=Measure y=DecileVal / markerattrs=(symbol=plus);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still need:&lt;/P&gt;&lt;P&gt;- Change pluses into horizontal lines&lt;/P&gt;&lt;P&gt;- To add vertical boxes that start at a Min value and end at Max.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can something like this be done in SGPlot?&amp;nbsp; I need to overlay odds ratios with CI over the bars?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate any help or pointers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 16:35:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-groups-of-boxes-with-decile-lines/m-p/96393#M3594</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2013-06-05T16:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple groups of boxes with decile lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-groups-of-boxes-with-decile-lines/m-p/96394#M3595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's another SGPLOT routine that gives me something similar to what I am looking for but with estimated rather than literal percentiles, 50th, 25th, and 75th percentiles and whiskers at 0 and 100.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 16:59:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-groups-of-boxes-with-decile-lines/m-p/96394#M3595</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2013-06-05T16:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple groups of boxes with decile lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-groups-of-boxes-with-decile-lines/m-p/96395#M3596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe not with SGPlot but you may find something at &lt;A href="http://support.sas.com/sassamples/graphgallery/PROC_SGRENDER_Graph_Template_Language__GTL_.html"&gt;http://support.sas.com/sassamples/graphgallery/PROC_SGRENDER_Graph_Template_Language__GTL_.html&lt;/A&gt; that looks close to what you want. There are links to code to create each of the examples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 17:52:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-groups-of-boxes-with-decile-lines/m-p/96395#M3596</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-06-05T17:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple groups of boxes with decile lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-groups-of-boxes-with-decile-lines/m-p/96396#M3597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion, Ballardw.&amp;nbsp; Nothing there that looks like what I want but a good resource. Also, have done very limited amount of programming in TEMPLATE.&amp;nbsp; Useful skill but a steep learning curve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ended up transposing the Tall file into a wide one and using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=df noautolegend;&lt;/P&gt;&lt;P&gt;&amp;nbsp; highlow x=Outcome low=D1 high=D11 /type=bar;&lt;/P&gt;&lt;P&gt;&amp;nbsp; highlow x=Outcome low=D2 high=D10 /type=bar;&lt;/P&gt;&lt;P&gt;&amp;nbsp; highlow x=Outcome low=D3 high=D9&amp;nbsp; /type=bar;&lt;/P&gt;&lt;P&gt;&amp;nbsp; highlow x=Outcome low=D4 high=D8&amp;nbsp; /type=bar;&lt;/P&gt;&lt;P&gt;&amp;nbsp; highlow x=Outcome low=D5 high=D7&amp;nbsp; /type=bar;&lt;/P&gt;&lt;P&gt;&amp;nbsp; highlow x=Outcome low=D6 high=D6&amp;nbsp; /type=bar;&lt;/P&gt;&lt;P&gt;&amp;nbsp; scatter x=Outcome y=OR / markerattrs=(color=black symbol=DiamondFilled size=15)&lt;/P&gt;&lt;P&gt;&amp;nbsp; yerrorlower=Lower yerrorupper=Upper errorbarattrs=(color=black thickness=2);&lt;/P&gt;&lt;P&gt;&amp;nbsp; xaxis labelattrs=(weight=bold size=14);&lt;/P&gt;&lt;P&gt;&amp;nbsp; yaxis label='Odds Ratio (95% CI)' labelattrs=(weight=bold size=14);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any feedback or suggestions for improvement is greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 19:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-groups-of-boxes-with-decile-lines/m-p/96396#M3597</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2013-06-05T19:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple groups of boxes with decile lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-groups-of-boxes-with-decile-lines/m-p/96397#M3598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; You can overlay SCATTERPLOT on BOXPLOT using GTL.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, you can use a combination of HIGHLOW plots to simulate a box plot as I discuss in this blog post.&amp;nbsp; &lt;SPAN style="color: #000000; font-family: Helvetica; font-size: 15px; text-align: -webkit-auto;"&gt;&lt;A class="jive-link-external-small" href="http://blogs.sas.com/content/graphicallyspeaking/2013/03/24/custom-box-plots/"&gt;http://blogs.sas.com/content/graphicallyspeaking/2013/03/24/custom-box-plots/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 11:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-groups-of-boxes-with-decile-lines/m-p/96397#M3598</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2013-06-09T11:02:08Z</dc:date>
    </item>
  </channel>
</rss>

