<?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 PROC FREQ TWOWAY = GROUPHORIZONTAL option in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-TWOWAY-GROUPHORIZONTAL-option/m-p/695610#M20653</link>
    <description>&lt;P&gt;I practiced an example from the textbook "The SAS Little Book", the program is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS GRAPHICS ON;
PROC FREQ DATA = bus; 
	TABLES BusType*OnTimeOrLate / PLOTS=FREQPLOT(TWOWAY = GROUPHORIZONTAL); 
RUN; 
ODS GRAPHICS OFF;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The plot shows the frequencies of the BusType variable by the OnTimeOrLate variable:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FreqPlot2.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51265i3496F91EDB9164B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FreqPlot2.png" alt="FreqPlot2.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nonetheless, the textbook shows a frequency plot of&amp;nbsp;the OnTimeOrLate variable by the BusType variable, even though the plot title is still "Distribution of BusType by OnTimeOrLate". Here is a screenshot from the textbook:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FreqPlot3.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51266iB2E428821E1E0D17/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FreqPlot3.png" alt="FreqPlot3.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I just have no idea why I cannot get the same plot as what the textbook shows. I do not think there is anything wrong with the program. Hopefully anyone can help me figure out.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 31 Oct 2020 01:11:56 GMT</pubDate>
    <dc:creator>Kabuto</dc:creator>
    <dc:date>2020-10-31T01:11:56Z</dc:date>
    <item>
      <title>PROC FREQ TWOWAY = GROUPHORIZONTAL option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-TWOWAY-GROUPHORIZONTAL-option/m-p/695610#M20653</link>
      <description>&lt;P&gt;I practiced an example from the textbook "The SAS Little Book", the program is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS GRAPHICS ON;
PROC FREQ DATA = bus; 
	TABLES BusType*OnTimeOrLate / PLOTS=FREQPLOT(TWOWAY = GROUPHORIZONTAL); 
RUN; 
ODS GRAPHICS OFF;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The plot shows the frequencies of the BusType variable by the OnTimeOrLate variable:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FreqPlot2.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51265i3496F91EDB9164B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FreqPlot2.png" alt="FreqPlot2.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nonetheless, the textbook shows a frequency plot of&amp;nbsp;the OnTimeOrLate variable by the BusType variable, even though the plot title is still "Distribution of BusType by OnTimeOrLate". Here is a screenshot from the textbook:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FreqPlot3.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51266iB2E428821E1E0D17/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FreqPlot3.png" alt="FreqPlot3.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I just have no idea why I cannot get the same plot as what the textbook shows. I do not think there is anything wrong with the program. Hopefully anyone can help me figure out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Oct 2020 01:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-TWOWAY-GROUPHORIZONTAL-option/m-p/695610#M20653</guid>
      <dc:creator>Kabuto</dc:creator>
      <dc:date>2020-10-31T01:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ TWOWAY = GROUPHORIZONTAL option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-TWOWAY-GROUPHORIZONTAL-option/m-p/695629#M20654</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15152"&gt;@Kabuto&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code and plot are correct, whereas the graph from the textbook doesn't match its title: A graph "by OnTimeOrLate" must consist of separate parts for different values (or format categories) of OnTimeOrLate, which is obviously not the case there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many textbooks contain errors, even some SAS Press titles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can reverse the grouping of the plot by switching the variable names in the TABLES statement or by adding the GROUPBY=ROW option in the parentheses after "FREQPLOT."&lt;/P&gt;</description>
      <pubDate>Sat, 31 Oct 2020 09:46:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-TWOWAY-GROUPHORIZONTAL-option/m-p/695629#M20654</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-10-31T09:46:42Z</dc:date>
    </item>
  </channel>
</rss>

