<?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: Grouped pie Chart and barplot comparing overall vs subset data in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234079#M8481</link>
    <description>&lt;P&gt;If your data is grouped, and you want to compare the values side by side by Category, you can use the Proc SGPLOT VBAR statement or the Proc GCHART VBAR statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=sashelp.cars;&lt;BR /&gt;&amp;nbsp; vbar origin / response=mpg_city group=type groupdisplay=cluster stat=mean;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Nov 2015 17:56:00 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2015-11-10T17:56:00Z</dc:date>
    <item>
      <title>Grouped pie Chart and barplot comparing overall vs subset data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234070#M8479</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to compare overall data with a subset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could do this overlaying histograms thanks to these&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/Overlay-histograms-all-data-vs-subset/m-p/135331/highlight/true#M5202" target="_self"&gt;great answer&lt;/A&gt;s.&lt;/P&gt;
&lt;P&gt;That was for&amp;nbsp;continuous data.&amp;nbsp;Can the same&amp;nbsp;be done with nominal and ordinal data in a grouped Pie chart or&amp;nbsp;barplot?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 17:22:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234070#M8479</guid>
      <dc:creator>majdi_ka</dc:creator>
      <dc:date>2015-11-10T17:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped pie Chart and barplot comparing overall vs subset data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234077#M8480</link>
      <description>Pls give an example Chart what you are looking for and sample data.</description>
      <pubDate>Tue, 10 Nov 2015 17:49:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234077#M8480</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-10T17:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped pie Chart and barplot comparing overall vs subset data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234079#M8481</link>
      <description>&lt;P&gt;If your data is grouped, and you want to compare the values side by side by Category, you can use the Proc SGPLOT VBAR statement or the Proc GCHART VBAR statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=sashelp.cars;&lt;BR /&gt;&amp;nbsp; vbar origin / response=mpg_city group=type groupdisplay=cluster stat=mean;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 17:56:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234079#M8481</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2015-11-10T17:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped pie Chart and barplot comparing overall vs subset data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234108#M8486</link>
      <description>&lt;P&gt;Thanks for answering.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is not exactly what I'm looking for. I want to compare the distribution of a subgroup with the overall distribution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's take an example.&lt;/P&gt;
&lt;P&gt;Assuming I have different clusters of customers, I want to see what are the characteristics&amp;nbsp;of&amp;nbsp;each one.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This can be done by comparing the distribution of each cluster with the overall distribution.&lt;/P&gt;
&lt;P&gt;For example, for cluster1, I compare its countries' proportions to all data countiries' proportions.&lt;/P&gt;
&lt;P&gt;A pie chart grouping both proportions can be visually easier to compare than two side by side pie charts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope my example is clear&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 20:38:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234108#M8486</guid>
      <dc:creator>majdi_ka</dc:creator>
      <dc:date>2015-11-10T20:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped pie Chart and barplot comparing overall vs subset data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234111#M8488</link>
      <description>I think you should use butterfly chat , that is mush better .Just give a search ..There is a great artical on this.</description>
      <pubDate>Tue, 10 Nov 2015 20:41:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234111#M8488</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-10T20:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped pie Chart and barplot comparing overall vs subset data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234112#M8489</link>
      <description>&lt;P&gt;+1 for the butterfly chart. Here is an example:&amp;nbsp;&lt;A href="http://support.sas.com/kb/35/051.html" target="_blank"&gt;http://support.sas.com/kb/35/051.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 20:49:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234112#M8489</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2015-11-10T20:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped pie Chart and barplot comparing overall vs subset data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234120#M8493</link>
      <description>&lt;P&gt;Thx&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/59783"&gt;@pearsoninst﻿&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas﻿&lt;/a&gt;&amp;nbsp;! Great idea.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I didn't find yet how to do this with all the data and a subset in the same graphic. And this is the hardest part.&lt;/P&gt;
&lt;P&gt;I think it can be done with proc template.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 21:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234120#M8493</guid>
      <dc:creator>majdi_ka</dc:creator>
      <dc:date>2015-11-10T21:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped pie Chart and barplot comparing overall vs subset data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234122#M8494</link>
      <description>&lt;P&gt;Regardless of whether you use SGPLOT or GTL/SGRENDER, the data manipulation is the same:&lt;/P&gt;
&lt;P&gt;1. Create a dataset with the subset data extracted from the original data, keeping only the columns necessary for the chart.&lt;/P&gt;
&lt;P&gt;2. Rename the kept columns in the new dataset to something different from the orginal data column names.&lt;/P&gt;
&lt;P&gt;3. Create a new dataset that is a "straight" merge (not "match-merge") of the subset data and the original data.&lt;/P&gt;
&lt;P&gt;4. Use this merged dataset in either SGPLOT or SGRENDER.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 21:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234122#M8494</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2015-11-10T21:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped pie Chart and barplot comparing overall vs subset data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234132#M8496</link>
      <description>&lt;P&gt;One benefit with GTL is you can use the EVAL feature&amp;nbsp;using IFC and IFN functions (and othe rways) to do subsetting of data on the fly inside the template.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 22:15:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234132#M8496</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2015-11-10T22:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped pie Chart and barplot comparing overall vs subset data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234985#M8529</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/59783"&gt;@pearsoninst﻿&lt;/a&gt;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas﻿&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54﻿&lt;/a&gt;&amp;nbsp;for your help. Very instructive !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I finally used a butterfly plot to compare nominal variables. I used the eval function in GTL to keep values related to a specific&amp;nbsp;filter variable's modality, and then compare them to overall values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Butterfly plot is finally clearer and easier to compare than a pie chart.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a macro to automate all this so that it can be reusable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 10:30:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/234985#M8529</guid>
      <dc:creator>majdi_ka</dc:creator>
      <dc:date>2015-11-17T10:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped pie Chart and barplot comparing overall vs subset data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/235015#M8531</link>
      <description>Great Job  majdi_ka .. Keep it up and all the best ...</description>
      <pubDate>Tue, 17 Nov 2015 14:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-pie-Chart-and-barplot-comparing-overall-vs-subset-data/m-p/235015#M8531</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-17T14:17:23Z</dc:date>
    </item>
  </channel>
</rss>

