<?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: PROC SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417290#M14371</link>
    <description>&lt;P&gt;It actually works if I do both Group and Category. The legend at the bottom still shows up though, so will have to fix that somehow.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Nov 2017 02:56:43 GMT</pubDate>
    <dc:creator>marianhabesland</dc:creator>
    <dc:date>2017-11-30T02:56:43Z</dc:date>
    <item>
      <title>PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417265#M14366</link>
      <description>&lt;P&gt;I have this code so far for making a box plot:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TITLE "Diastolic Blood Pressure by Ethnicity/Race Group" BOLD;&lt;BR /&gt;PROC SGPLOT DATA = HypAnl.HypPrimanl;&lt;BR /&gt;VBOX DBP / GROUP = EthRaceCd&lt;BR /&gt;FILLATTRS= (COLOR=LIGHTRED) LINEATTRS= (COLOR=BLACK);&lt;BR /&gt;YAXIS LABEL = "Latest DBP Measurement"&lt;BR /&gt;LABELATTRS=(Weight=Bold)&lt;BR /&gt;VALUES = (10 TO 100 BY 10);&lt;BR /&gt;XAXIS LABEL = "Ethnicity/Race Group"&lt;BR /&gt;LABELATTRS=(Weight=Bold);&lt;BR /&gt;REFLINE 90 / LABEL= "Hypertension Threshold"&lt;BR /&gt;LINEATTRS= (COLOR=RED);&lt;BR /&gt;INSET "Data Source: HypAnl.HypPrimAnl (As of December 31, 2014)";&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current box plot looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2017-11-29 at 15.50.08.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16918i197EF9A7A74B67A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2017-11-29 at 15.50.08.png" alt="Screen Shot 2017-11-29 at 15.50.08.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I want it to look like the one below. Specifically what I want to change is that the groups (Hispanic, NH Asian etc) actually appear on the X-axis with gridlines. Any ideas?&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="Screen Shot 2017-11-29 at 15.48.09.png" style="width: 397px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16917i52A0741D69293690/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2017-11-29 at 15.48.09.png" alt="Screen Shot 2017-11-29 at 15.48.09.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 22:54:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417265#M14366</guid>
      <dc:creator>marianhabesland</dc:creator>
      <dc:date>2017-11-29T22:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417268#M14367</link>
      <description>&lt;P&gt;To get axis labels try using Category=EthRaceCd instead of Group=&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To your Yaxis statement add GRID to get gridlines at the tick marks.&lt;/P&gt;
&lt;P&gt;Gridattrs would be used to control the appearance of the grid lines.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 23:28:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417268#M14367</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-11-29T23:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417274#M14368</link>
      <description>&lt;P&gt;When I change group to category it does show the label like I want it, but it also only produces one box plot, like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2017-11-29 at 16.58.54.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16920i48F536426A371B87/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2017-11-29 at 16.58.54.png" alt="Screen Shot 2017-11-29 at 16.58.54.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 00:02:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417274#M14368</guid>
      <dc:creator>marianhabesland</dc:creator>
      <dc:date>2017-11-30T00:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417276#M14369</link>
      <description>&lt;P&gt;Show data in the form of a data step and the actual code you used with category.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have pages of output with category and get one box for each level of the category variable.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 00:18:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417276#M14369</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-11-30T00:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417282#M14370</link>
      <description>&lt;P&gt;&amp;nbsp;I am using a data file that is formatted like this. These are the two variables that are included in the box plot. The code I provided over is the entire code that I used to produce the box plot.&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="Screen Shot 2017-11-29 at 17.52.33.png" style="width: 402px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16922i888A958FF8F8A15F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2017-11-29 at 17.52.33.png" alt="Screen Shot 2017-11-29 at 17.52.33.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 00:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417282#M14370</guid>
      <dc:creator>marianhabesland</dc:creator>
      <dc:date>2017-11-30T00:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417290#M14371</link>
      <description>&lt;P&gt;It actually works if I do both Group and Category. The legend at the bottom still shows up though, so will have to fix that somehow.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 02:56:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417290#M14371</guid>
      <dc:creator>marianhabesland</dc:creator>
      <dc:date>2017-11-30T02:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417335#M14372</link>
      <description>&lt;P&gt;Use the NOAUTOLEGEND option in the procedure statement to suppress the legend at the bottom.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want the legend somewhere else, you can control that with the &lt;A href="http://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=p0xmbppzx71smbn1203aaif96z86.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=da" target="_self"&gt;KEYLEGEND Statemend&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 08:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417335#M14372</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-11-30T08:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417461#M14373</link>
      <description>&lt;P&gt;Switching to Category worked for me. What exact version of SAS do you have, I'm using 9.4M3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;TITLE "Diastolic Blood Pressure by Ethnicity/Race Group" BOLD;

PROC SGPLOT DATA = sashelp.heart;
	VBOX diastolic / category = smoking_status
		FILLATTRS= (COLOR=LIGHTRED) LINEATTRS= (COLOR=BLACK);
	
	REFLINE 90 / LABEL= "Hypertension Threshold"
		LINEATTRS= (COLOR=RED);

	INSET "Data Source: HypAnl.HypPrimAnl (As of December 31, 2014)";

	YAXIS LABEL = "Latest DBP Measurement"
		LABELATTRS=(Weight=Bold)
		VALUES = (10 TO 100 BY 10);

	XAXIS LABEL = "Smoking Group"
		LABELATTRS=(Weight=Bold);

RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Nov 2017 16:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT/m-p/417461#M14373</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-30T16:08:57Z</dc:date>
    </item>
  </channel>
</rss>

