<?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: Need help to understand the plot produced by proc sgplot in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Need-help-to-understand-the-plot-produced-by-proc-sgplot/m-p/548494#M8530</link>
    <description>&lt;P&gt;In the SGPLOT output, there don't appear to be 20 bins in the range 41 and 60 (for example, it's probably true for all 20 unit increments). So you need to modify your SGPLOT code to make sure you have 20 bins for every 20 units on the x-axis.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Apr 2019 13:49:05 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-04-04T13:49:05Z</dc:date>
    <item>
      <title>Need help to understand the plot produced by proc sgplot</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-help-to-understand-the-plot-produced-by-proc-sgplot/m-p/548493#M8529</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I produced a histogram with proc sgplot using this code:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=work.test;
  histogram age_num;
  density age_num;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The plot produced is the followed:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPlot2.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28442iEBE55BEC8261E6E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SGPlot2.png" alt="SGPlot2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As you can see, there are some irregularities for some ages. To validate, I tried to create the same chart using prec freq instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=work.test;
table age_num /plots=freqplot;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The chart is the following, which, as you can see, is very different, since there are no more irregularities.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FreqPlot.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28441i62D673E635543A51/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FreqPlot.png" alt="FreqPlot.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I wonder: how is this possible? Maybe I do not interpret correctly the output produced by the&amp;nbsp;&lt;CODE class=" language-sas"&gt;proc sgplot.&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 13:43:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-help-to-understand-the-plot-produced-by-proc-sgplot/m-p/548493#M8529</guid>
      <dc:creator>Demographer</dc:creator>
      <dc:date>2019-04-04T13:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to understand the plot produced by proc sgplot</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-help-to-understand-the-plot-produced-by-proc-sgplot/m-p/548494#M8530</link>
      <description>&lt;P&gt;In the SGPLOT output, there don't appear to be 20 bins in the range 41 and 60 (for example, it's probably true for all 20 unit increments). So you need to modify your SGPLOT code to make sure you have 20 bins for every 20 units on the x-axis.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 13:49:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-help-to-understand-the-plot-produced-by-proc-sgplot/m-p/548494#M8530</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-04T13:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to understand the plot produced by proc sgplot</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-help-to-understand-the-plot-produced-by-proc-sgplot/m-p/548495#M8531</link>
      <description>&lt;P&gt;Read this article&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/08/25/bins-for-histograms.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2014/08/25/bins-for-histograms.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 13:52:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-help-to-understand-the-plot-produced-by-proc-sgplot/m-p/548495#M8531</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-04T13:52:03Z</dc:date>
    </item>
  </channel>
</rss>

