<?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: Band in PROC SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Band-in-PROC-SGPLOT/m-p/82179#M3034</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG __jive_id="2343" alt="Band.png" class="jive-image" src="https://communities.sas.com/legacyfs/online/2343_Band.png" /&gt;&lt;/P&gt;&lt;P&gt;The "constant" bands are extended to the edge only if the X variable is numeric.&amp;nbsp; So, change your X variable to numeric, and add a UDF for the labels and set x axis offsets to 0.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=BandNum;&lt;/P&gt;&lt;P&gt;&amp;nbsp; band x=x upper=1.5 lower=1.05;&lt;/P&gt;&lt;P&gt;&amp;nbsp; scatter x=x y=y / group=group name='a';&lt;/P&gt;&lt;P&gt;&amp;nbsp; yaxis values=(0 to 2 by 0.2) display=(nolabel);&lt;/P&gt;&lt;P&gt;&amp;nbsp; xaxis offsetmin=0.2 offsetmax=0.2 display=(nolabel) values=(1 2);&lt;/P&gt;&lt;P&gt;&amp;nbsp; keylegend 'a' / location=inside position=topright;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2012 13:34:49 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2012-08-02T13:34:49Z</dc:date>
    <item>
      <title>Band in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Band-in-PROC-SGPLOT/m-p/82177#M3032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The attached graph was created in PROC SGPLOT. I want the gray band to extend the full width of the plot.&amp;nbsp; However, I would like the data points to stay where they are.&amp;nbsp; Any suggestions?&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10714i9D91598E795F2404/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Graph Example.PNG" title="Graph Example.PNG" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 11:59:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Band-in-PROC-SGPLOT/m-p/82177#M3032</guid>
      <dc:creator>fastb</dc:creator>
      <dc:date>2012-08-02T11:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Band in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Band-in-PROC-SGPLOT/m-p/82178#M3033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure how to do it in sgplot, but you can do it in gplot by annotating the gray shaded range ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data foo;&lt;BR /&gt;input entry $ 1-7 value group;&lt;BR /&gt;datalines;&lt;BR /&gt;Entry A 1.20 1&lt;BR /&gt;Entry A 1.25 2&lt;BR /&gt;Entry A 1.50 3&lt;BR /&gt;Entry A 1.60 4&lt;BR /&gt;Entry B 1.23 1&lt;BR /&gt;Entry B 1.41 2&lt;BR /&gt;Entry B 1.52 3&lt;BR /&gt;Entry B 1.61 4&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data anno_range;&lt;BR /&gt;xsys='1'; ysys='2'; when='b';&lt;BR /&gt;function='move'; x=0; y=1.2; output;&lt;BR /&gt;function='bar'; x=100; y=1.6; color='graydd'; style='solid'; output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;symbol1 value=circle interpol=none color=black;&lt;BR /&gt;symbol2 value=triangle interpol=none color=black;&lt;BR /&gt;symbol3 value='x' interpol=none color=black;&lt;BR /&gt;symbol4 value=plus interpol=none color=black;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;axis1 label=none minor=none order=(0 to 2.0 by .2) offset=(0,0);&lt;BR /&gt;axis2 label=none offset=(30,30);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gplot data=foo anno=anno_range;&lt;BR /&gt;plot value*entry=group / vaxis=axis1 haxis=axis2 nolegend;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 12:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Band-in-PROC-SGPLOT/m-p/82178#M3033</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2012-08-02T12:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Band in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Band-in-PROC-SGPLOT/m-p/82179#M3034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG __jive_id="2343" alt="Band.png" class="jive-image" src="https://communities.sas.com/legacyfs/online/2343_Band.png" /&gt;&lt;/P&gt;&lt;P&gt;The "constant" bands are extended to the edge only if the X variable is numeric.&amp;nbsp; So, change your X variable to numeric, and add a UDF for the labels and set x axis offsets to 0.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=BandNum;&lt;/P&gt;&lt;P&gt;&amp;nbsp; band x=x upper=1.5 lower=1.05;&lt;/P&gt;&lt;P&gt;&amp;nbsp; scatter x=x y=y / group=group name='a';&lt;/P&gt;&lt;P&gt;&amp;nbsp; yaxis values=(0 to 2 by 0.2) display=(nolabel);&lt;/P&gt;&lt;P&gt;&amp;nbsp; xaxis offsetmin=0.2 offsetmax=0.2 display=(nolabel) values=(1 2);&lt;/P&gt;&lt;P&gt;&amp;nbsp; keylegend 'a' / location=inside position=topright;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 13:34:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Band-in-PROC-SGPLOT/m-p/82179#M3034</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2012-08-02T13:34:49Z</dc:date>
    </item>
  </channel>
</rss>

