<?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: How can I adjust the bins on a histogram in SAS? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-can-I-adjust-the-bins-on-a-histogram-in-SAS/m-p/541498#M17876</link>
    <description>&lt;P&gt;You have 11 bins, not 10.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2019 17:42:03 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-03-08T17:42:03Z</dc:date>
    <item>
      <title>How can I adjust the bins on a histogram in SAS?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-can-I-adjust-the-bins-on-a-histogram-in-SAS/m-p/541486#M17875</link>
      <description>&lt;P&gt;I have the following code, and when I run it, it gives me the following output graph, but I want to adjust my histogram so that the x-axis shows the values of sum_dices from {2, 3, 4, …, 12} and the y-axis is the corresponding percent for each sum_dice (i.e {2.78, 5.56, 8.33, …, 2.78} ). I tried to do this by setting the binwidth to 1 but it did not really change anything to my understanding. I am new to SAS so I will appreciate any help you can provide me. Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;CODE:&amp;nbsp;&lt;/P&gt;&lt;P&gt;data auto;&lt;BR /&gt;do dice1= 1 to 6;&lt;BR /&gt;do dice2= 1 to 6;&lt;BR /&gt;sum_dices = sum(dice1, dice2);&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;proc freq data = auto;&lt;BR /&gt;proc sgplot data = auto;&lt;BR /&gt;histogram sum_dices/ nbins = 10 binwidth = 1 showbins scale= count datalabel=percent;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OUTPUT:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.jpg" style="width: 439px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27777i5969E38A60FD219F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.jpg" alt="2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27778i4BC633BE8AB34EC0/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 17:29:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-can-I-adjust-the-bins-on-a-histogram-in-SAS/m-p/541486#M17875</guid>
      <dc:creator>Fara_I</dc:creator>
      <dc:date>2019-03-08T17:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: How can I adjust the bins on a histogram in SAS?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-can-I-adjust-the-bins-on-a-histogram-in-SAS/m-p/541498#M17876</link>
      <description>&lt;P&gt;You have 11 bins, not 10.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 17:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-can-I-adjust-the-bins-on-a-histogram-in-SAS/m-p/541498#M17876</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-08T17:42:03Z</dc:date>
    </item>
  </channel>
</rss>

