<?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: Subgroup in proc GCHART in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245639#M8903</link>
    <description>&lt;P&gt;Do you need to calculate the percentages or is it already calculated, as in the example?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the example above you can limit your data to category=CAT1&amp;nbsp;and use a vbar to create a plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also pre calculate the percentages and then use proc sgplot with vbar or a gchart graph.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you post some sample data someone can help with code.&lt;/P&gt;</description>
    <pubDate>Sat, 23 Jan 2016 17:36:02 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-01-23T17:36:02Z</dc:date>
    <item>
      <title>Subgroup in proc GCHART</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245619#M8902</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is is possible if in the below example from SAS support, I can only display cat1. So, my first bar will have 60% in midpoint=1, 2nd bar as 30% and 3rd bar as 80%?&amp;nbsp;My data is the same and each bar should still calculate the %of each cat for each midpoint, but should only display %for cat=1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example: &lt;A href="http://support.sas.com/kb/41/976.html" target="_blank"&gt;http://support.sas.com/kb/41/976.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jan 2016 12:16:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245619#M8902</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2016-01-23T12:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Subgroup in proc GCHART</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245639#M8903</link>
      <description>&lt;P&gt;Do you need to calculate the percentages or is it already calculated, as in the example?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the example above you can limit your data to category=CAT1&amp;nbsp;and use a vbar to create a plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also pre calculate the percentages and then use proc sgplot with vbar or a gchart graph.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you post some sample data someone can help with code.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jan 2016 17:36:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245639#M8903</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-23T17:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Subgroup in proc GCHART</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245672#M8904</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to prepare the graph but now I have another problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way in proc gchart to assign specific colors to the bars? I am trying annotation, but its not working.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2016 03:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245672#M8904</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2016-01-24T03:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Subgroup in proc GCHART</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245674#M8905</link>
      <description>&lt;P&gt;You can use the methods here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#colors-specify-color.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#colors-specify-color.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Changing the style is relatively easily.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're just doing a bar chart, you may want to consider PROC SGPLOT instead, it has better graphics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your question is answered, please mark the question answered and ask your new questions in a new thread.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2016 05:32:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245674#M8905</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-24T05:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Subgroup in proc GCHART</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245914#M8911</link>
      <description>&lt;P&gt;The old school approaches, which GCHART uses, if you want to display a specific color for a specific value you need to know the Order of your data as the first displayed with use the the first color definition (if only using style) or the first PATTERN statement. You would define separate pattern statements:&lt;/P&gt;
&lt;P&gt;Pattern1 color=green;&lt;/P&gt;
&lt;P&gt;Pattern2 color=gold;&lt;/P&gt;
&lt;P&gt;Pattern3 color=blue;&lt;/P&gt;
&lt;P&gt;... for as many patterns as you need. You will want to look up the different ways to define colors if the named colors don't work out quite as you want. SAS support use of RGB, CMYK, HSV, HSB, gray scale, named and SAS&amp;nbsp;Color Naming System (CNS) which uses names similar to brightreddishyellow.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2016 17:42:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245914#M8911</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-25T17:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Subgroup in proc GCHART</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245936#M8912</link>
      <description>&lt;P&gt;I'm not sure of your SAS version, but try these examples using attrmaps and percentages using SGPLOT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data gendermap; &lt;BR /&gt;retain id "gender"; &lt;BR /&gt;length fillcolor $ 9; &lt;BR /&gt;input value $ fillcolor $; &lt;BR /&gt;cards; &lt;BR /&gt;F pink &lt;BR /&gt;M lightblue &lt;BR /&gt;; &lt;BR /&gt;run; &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;/* percentages across all midpoints */&lt;BR /&gt;&lt;SPAN&gt;proc sgplot data=sashelp.class dattrmap=gendermap; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;vbar age / response=height group=sex attrid=gender stat=percent groupdisplay=cluster datalabel; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;/* Percentages within each midpoint */&lt;BR /&gt;proc sgplot data=sashelp.class dattrmap=gendermap pctlevel=group; &lt;BR /&gt;vbar age / response=height group=sex attrid=gender stat=percent groupdisplay=cluster datalabel; &lt;BR /&gt;run; &lt;BR /&gt; &lt;BR /&gt;&lt;SPAN&gt;/* Percentages within each midpoint and stacked groups*/&lt;/SPAN&gt;&lt;BR /&gt;proc sgplot data=sashelp.class dattrmap=gendermap pctlevel=group; &lt;BR /&gt;vbar age / response=height group=sex attrid=gender stat=percent seglabel; &lt;BR /&gt;run;&lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2016 18:20:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245936#M8912</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-01-25T18:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Subgroup in proc GCHART</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245937#M8913</link>
      <description>Thanks for the reply. I did a workaround using macros and is working.&lt;BR /&gt;&lt;BR /&gt;Priya.&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Mon, 25 Jan 2016 18:24:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Subgroup-in-proc-GCHART/m-p/245937#M8913</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2016-01-25T18:24:35Z</dc:date>
    </item>
  </channel>
</rss>

