<?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: Help with Gchart -horizontal bar, with over-under subgroups in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157826#M5912</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this example, and see if it is what you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=sashelp.class;&lt;/P&gt;&lt;P&gt;hbar age / response=height stat=mean barwidth=0.4 discreteoffset=-0.2 x2axis;&lt;/P&gt;&lt;P&gt;hbar age / response=weight stat=mean barwidth=0.4 discreteoffset=0.2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Dec 2014 15:45:20 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2014-12-19T15:45:20Z</dc:date>
    <item>
      <title>Help with Gchart -horizontal bar, with over-under subgroups</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157825#M5911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a small data set containing roughly 30 cases which have variables for ID (alphanumeric), size ("Large", "Extra Large"), a variable containing the percent passed using one inspection type (call it "Contractor_Passed") and another containing the percent passed using another type ("Public_Passed"). I want a horizontal bar chart with all the agencies on the y axis (showing the ID variable), each having two bars (one under the other): one for each score type.&amp;nbsp; Basically, I'm comparing the percent passed of each type of inspection for each agency.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried looking online, but all of the gcharts with subgroups I've found have grouping based one one dichotomous categorical variable (e.g. gender) with single split bars.&amp;nbsp; Can Gchart make over-under bars with grouping based on two numeric variables, which I am comparing?&amp;nbsp; If necessary, I can make one for each size category and then use GREPLAY to put them side by side.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 15:27:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157825#M5911</guid>
      <dc:creator>WGE914</dc:creator>
      <dc:date>2014-12-19T15:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Gchart -horizontal bar, with over-under subgroups</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157826#M5912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this example, and see if it is what you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=sashelp.class;&lt;/P&gt;&lt;P&gt;hbar age / response=height stat=mean barwidth=0.4 discreteoffset=-0.2 x2axis;&lt;/P&gt;&lt;P&gt;hbar age / response=weight stat=mean barwidth=0.4 discreteoffset=0.2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 15:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157826#M5912</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2014-12-19T15:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Gchart -horizontal bar, with over-under subgroups</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157827#M5913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just saw that both of your responses are percentages, so you might want to drop the "x2axis" option from the first HBAR statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 15:46:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157827#M5913</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2014-12-19T15:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Gchart -horizontal bar, with over-under subgroups</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157828#M5914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I found a way to combine the two graphs I have using SGPANEL, but I cannot get the layout the way I want it.&amp;nbsp;&amp;nbsp; When I split the panels by size (2 categories) I see all the cases along wht x axis for both categories, leaving a lot of empty space in the panels.&amp;nbsp; My data set is structured so that each record is ONE of the TWO categories I am splitting the panels by.&amp;nbsp; How do I remove the empty records from the panels so that each panel only includes the applicable records instead of all?&amp;nbsp;&amp;nbsp;&amp;nbsp; Here is my working code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14190144494026968" jivemacro_uid="_14190144494026968" modifiedtitle="true"&gt;
&lt;P&gt;proc sgpanel data=DATA_FINAL;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; panelby size&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; rowaxis label="Percent Passed";&lt;/P&gt;
&lt;P&gt;&amp;nbsp; colaxis discreteorder=data label = 'Agency';&lt;/P&gt;
&lt;P&gt; vbar ID / response=_Passed_by_c stat=mean barwidth=0.4&amp;nbsp; discreteoffset=0.5&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt; vbar ID / response=_Passed_by_P stat=mean barwidth=0.8&amp;nbsp; discreteoffset=0.5 transparency=.4 ;&lt;/P&gt;
&lt;P&gt; run; &lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I get this fixed, I can work on the bar widths and spacing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 18:43:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157828#M5914</guid>
      <dc:creator>WGE914</dc:creator>
      <dc:date>2014-12-19T18:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Gchart -horizontal bar, with over-under subgroups</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157829#M5915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On the PANELBY statement, specify:&lt;/P&gt;&lt;P&gt;panelby size / uniscale=row layout=columnlattice;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I'm not sure of your intent, by having both DISCRETEOFFSETs set to 0.5 will still make the bars be on top of one another. Did you mean to drop the minus from one of the statements?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Dan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 18:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157829#M5915</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2014-12-19T18:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Gchart -horizontal bar, with over-under subgroups</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157830#M5916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I prefer to have the bars completely overlapped; I find it much easier to read when the differences between the two are so great.&amp;nbsp; I also increased the width of the bar corresponding to the 'base' measure so that the reader can differentiate the measures in the lower portion. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 12:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157830#M5916</guid>
      <dc:creator>WGE914</dc:creator>
      <dc:date>2014-12-22T12:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Gchart -horizontal bar, with over-under subgroups</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157831#M5917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you like the overlap, you might like this approach better:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-family: helvetica, arial; color: black; background-color: inherit; font-size: 9pt !important;"&gt;vbar ID / response=_Passed_by_c stat=mean &lt;SPAN style="color: #000000; font-family: helvetica, arial; font-size: 12px;"&gt;transparency=.4&lt;/SPAN&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: helvetica, arial; font-size: 9pt; font-style: inherit; line-height: 1.5em;"&gt;vbar ID / response=_Passed_by_P stat=mean barwidth=0.5&amp;nbsp; transparency=.4 ;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 21:28:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-Gchart-horizontal-bar-with-over-under-subgroups/m-p/157831#M5917</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2014-12-22T21:28:25Z</dc:date>
    </item>
  </channel>
</rss>

