<?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: Barchart and scatterplot in proc template in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Barchart-and-scatterplot-in-proc-template/m-p/136607#M5225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why can't you use proc SGPLOT with VBAR with GroupDisplay=Cluster and Data Label?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use BarWidth=1 to not get spaces between bars.&amp;nbsp; If you attach your full program with data, it is easier to help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jul 2014 15:35:54 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2014-07-25T15:35:54Z</dc:date>
    <item>
      <title>Barchart and scatterplot in proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Barchart-and-scatterplot-in-proc-template/m-p/136605#M5223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to barchart using proc sgrender. My dataset has variable called ID with 2 different values for time ,group and reasons. To plot data points correctly I formatted ID in such a way that it has values _n_ according to the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; TIME&amp;nbsp; group&amp;nbsp; id_ reasons&amp;nbsp; length&amp;nbsp; stat&amp;nbsp; statvar&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 35&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; age&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yyy&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asian&amp;nbsp;&amp;nbsp; ethinic&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; country&amp;nbsp; xxx&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yyy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I calculated length variable from time so that that graph plot value just above the bar . length = time+1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create bar chart in such a way that group A and B gets different colors for the corresponding ID and there shouldn't be any space between bars.&amp;nbsp; The code I used is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc template;&lt;/P&gt;&lt;P&gt;define statgraph barcolors;&lt;/P&gt;&lt;P&gt;dynamic xvar yvar;&lt;/P&gt;&lt;P&gt;begingraph;&lt;/P&gt;&lt;P&gt;discreattrmaps name='catcolors'/ignorecase=true&lt;/P&gt;&lt;P&gt; VALUE 'A'/FILLATTRS(COLOR=BLUE);&lt;/P&gt;&lt;P&gt;VALUE 'B'/FILLATTRS(COLOR=RED);&lt;/P&gt;&lt;P&gt;enddiscretattrmaps;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;discreattrmaps attrvars=group var=group attrmap='catcolors';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;layout overlay/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yaxisopts-----&lt;/P&gt;&lt;P&gt;xaxisopt------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;barchartparam x = id_ y = time/primary=yes&amp;nbsp; groups = group groupdisplay = cluster name='colors'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;scatterplot x =id_ y = length/markerattrs=(size=5 weight=bold)group=reasons;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I have is since id_ has different value for same ID , it create a space between bars. If I use ID instead of id_ in scatterplot then all the reasons goes to first bar not to corresponding bar. How can I tell SAS not to put space between bars for each ID?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also trying to put a table under graph. since there are 2 bars for each ID, graph is having trouble to put values under each ID in the table. Is there any solution for this too?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;boxplot x= id_&amp;nbsp; y = stat/class=varstat;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 02:29:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Barchart-and-scatterplot-in-proc-template/m-p/136605#M5223</guid>
      <dc:creator>anurak</dc:creator>
      <dc:date>2014-07-25T02:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart and scatterplot in proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Barchart-and-scatterplot-in-proc-template/m-p/136606#M5224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without examples of your data it is a bit difficult to make complete suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would recommend visiting &lt;BR /&gt;&lt;A href="http://support.sas.com/sassamples/graphgallery/PROC_SGRENDER.html"&gt;http://support.sas.com/sassamples/graphgallery/PROC_SGRENDER.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or &lt;A href="http://robslink.com/SAS/"&gt;http://robslink.com/SAS/&lt;/A&gt; and see if you find something that looks like what you want to do and examine that code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 15:28:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Barchart-and-scatterplot-in-proc-template/m-p/136606#M5224</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-07-25T15:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart and scatterplot in proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Barchart-and-scatterplot-in-proc-template/m-p/136607#M5225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why can't you use proc SGPLOT with VBAR with GroupDisplay=Cluster and Data Label?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use BarWidth=1 to not get spaces between bars.&amp;nbsp; If you attach your full program with data, it is easier to help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 15:35:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Barchart-and-scatterplot-in-proc-template/m-p/136607#M5225</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2014-07-25T15:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart and scatterplot in proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Barchart-and-scatterplot-in-proc-template/m-p/136608#M5226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! I used the code from the following &lt;A class="jive-link-external-small active_link" href="http://support.sas.com/sassamples/graphgallery/PROC_SGRENDER.html"&gt;PROC_SGRENDER.html &lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It worked fine . Another question I have is when I use scatter plot over barchart to put points on the top of each bar, symbols goes to corner of bar instead of middle of each bar if there are 2 bars per ID. If there is only one bar per id then the symbol goes to the center of bar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; TIME&amp;nbsp; group&amp;nbsp; id_ reasons&amp;nbsp; length&amp;nbsp; &lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yyy&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SCATTERPLOT X = ID Y =LENGTH/group = reasons markerattrs(size = 2 weight=bold)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyway to tell SAS to put symbols in the center of each bars?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 18:03:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Barchart-and-scatterplot-in-proc-template/m-p/136608#M5226</guid>
      <dc:creator>anurak</dc:creator>
      <dc:date>2014-07-25T18:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart and scatterplot in proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Barchart-and-scatterplot-in-proc-template/m-p/136609#M5227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might try MARKERCHARACTER with a symbol font set using MARKERCHARACTERATTRS as the online help says this centers strings. If A B etc are acceptable for symbols it should work fine instead fo markerattrs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 19:44:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Barchart-and-scatterplot-in-proc-template/m-p/136609#M5227</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-07-25T19:44:37Z</dc:date>
    </item>
  </channel>
</rss>

