<?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: Boxplot Programming Assistance - Labeling Data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/591972#M169684</link>
    <description>&lt;P&gt;Thank you, thank you!!!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2019 19:13:29 GMT</pubDate>
    <dc:creator>aylee214</dc:creator>
    <dc:date>2019-09-26T19:13:29Z</dc:date>
    <item>
      <title>Boxplot Programming Assistance - Labeling Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/589454#M168599</link>
      <description>&lt;P&gt;I'm pretty new to using SAS for creating graphs and charts. I copied some programming from a SAS program I found online and it did help create a graph that I like, but the names overlap. I was wondering if there was a way to create something that wouldn't overlap? I have provided the code and attached the chart.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;boxplot&lt;/STRONG&gt; data=Work.FruitOutliers;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; plot ErrorPer*DateofReport /&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boxstyle=schematicid&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nohlabel;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; id Outliers;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; label ErrorPer = 'Errors';&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;goptions reset=symbol;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 18:40:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/589454#M168599</guid>
      <dc:creator>aylee214</dc:creator>
      <dc:date>2019-09-17T18:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Boxplot Programming Assistance - Labeling Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/589456#M168600</link>
      <description>I would highly recommend using SGPLOT and the VBOX or HBOX statements instead of BOXPLOT. &lt;BR /&gt;&lt;BR /&gt;BOXPLOT is pretty old as a procedure though SAS maintains backwards compatibility.&lt;BR /&gt;&lt;BR /&gt;Some examples are here:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2016/12/08/getting-started-sgplot-part-3-vbox/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2016/12/08/getting-started-sgplot-part-3-vbox/&lt;/A&gt;</description>
      <pubDate>Tue, 17 Sep 2019 18:54:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/589456#M168600</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-09-17T18:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Boxplot Programming Assistance - Labeling Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/589785#M168732</link>
      <description>&lt;P&gt;Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I work with aylee214 and we are working on this chart together.&amp;nbsp; We would be glad to try using SGPLOT, but after looking at the linked examples, we were not sure whether&amp;nbsp;there is a way to add labels? For example,&amp;nbsp;in this picture, the various fruit names are shown (which we like),&amp;nbsp;but we want to&amp;nbsp;somehow make it cleaner so that the names don't overlap. Would&amp;nbsp;a VBOX or HBOX statement allow us to do that?&amp;nbsp; Thanks for your help, we appreciate it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32585i31731D7D7745CB57/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2019 18:51:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/589785#M168732</guid>
      <dc:creator>brookeewhite1</dc:creator>
      <dc:date>2019-09-18T18:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Boxplot Programming Assistance - Labeling Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/589851#M168762</link>
      <description>&lt;P&gt;Should be doable with GTL. This is an example from the documentation and you should have the SASHELP.CARS data set it uses.&lt;/P&gt;
&lt;PRE&gt;proc template;
  define statgraph boxplot;
    begingraph;
      entrytitle "City Mileage for Vehicle Types";
      layout overlay /
        xaxisopts=(offsetmin=0.1 offsetmax=0.1);
        boxplot y=mpg_city x=type /
          datalabel=make spread=true;
      endlayout;
    endgraph;
  end;
run;

proc sgrender data=sashelp.cars template=boxplot;
  label type="Vehicle Type";
run;&lt;/PRE&gt;
&lt;P&gt;You would obviously change the text for Entrytitle (or remove entirely) and specify your variables for X= and y=. Datalabel=Make tells SAS to use the value the Make variable as a label for the outliers. The Spread=True horizontally spreads values that are the same on the Y axis so you can see separate markers to the labels may have issues if you have lots of these. You would also change the Sgrender code to reference your data set and likely the Label of the X variable. It would use any default label for your X and Y variables on the axis labels.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The xaxisopts used provide some space between the boxes on the left and right limits of the graph. Sometimes the defaults will crowd things up to the limits of the graph area.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2019 22:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/589851#M168762</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-18T22:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Boxplot Programming Assistance - Labeling Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/589878#M168773</link>
      <description>You can pair vbox with data label options or even addd your own text statements so IMO it gives you the most flexibility. And if you can’t figure it out via SGPLOT, then it can generate the GTL code via TMPLOUT option and you can modify that.</description>
      <pubDate>Thu, 19 Sep 2019 01:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/589878#M168773</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-09-19T01:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Boxplot Programming Assistance - Labeling Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/591963#M169678</link>
      <description>&lt;P&gt;ballardw,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp; Once we tried your code as a template and substituted our data it worked like a charm and looks so much better than before!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 18:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/591963#M169678</guid>
      <dc:creator>brookeewhite1</dc:creator>
      <dc:date>2019-09-26T18:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Boxplot Programming Assistance - Labeling Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/591972#M169684</link>
      <description>&lt;P&gt;Thank you, thank you!!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 19:13:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Boxplot-Programming-Assistance-Labeling-Data/m-p/591972#M169684</guid>
      <dc:creator>aylee214</dc:creator>
      <dc:date>2019-09-26T19:13:29Z</dc:date>
    </item>
  </channel>
</rss>

