<?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 plot the percentages on my histogram? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-can-I-plot-the-percentages-on-my-histogram/m-p/541445#M7371</link>
    <description>&lt;P&gt;Here is a more efficient way to create your AUTOS data set:&lt;/P&gt;
&lt;PRE&gt;DATA auto;
   do dice1= 1 to 6;
      do dice2= 1 to 6;
         sum_dices = sum(dice1, dice2);
         output;
      end;
   end;
run;&lt;/PRE&gt;
&lt;P&gt;Why do I say more efficient? Can change for 6-sided dice to any N-sided dice where N &amp;gt;= 1. Adding a third, forth or more dice is simple by just adding more do loops, one for each. You can easily examine differences involving more or different numbers of faces on dice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since 3 6-sided dice has 216 permutations that would be a lot of cards statements to get right.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2019 16:01:44 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-03-08T16:01:44Z</dc:date>
    <item>
      <title>How can I plot the percentages on my histogram?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-can-I-plot-the-percentages-on-my-histogram/m-p/541288#M7339</link>
      <description>&lt;P&gt;I need to adjust my code so that I can plot the percentage column of sum_dices in my histogram, but when I run it I get the following output. So instead of plotting the count of each sum, I want to plot the percentage such as 2.78 for 2, 5.56 for 3, and so forth. I have tried adjusting the VBAR line but could not get it to display the values I want. I am fairly new to SAS so I appreciate any help you can provide me, thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27756iFFED3495C7A5B7E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1.jpg" alt="1.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="2.jpg" style="width: 439px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27758iF2747CADF36BD12C/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;DATA auto;&lt;BR /&gt;INPUT dice1 dice2;&lt;BR /&gt;sum_dices = sum(dice1, dice2);&lt;BR /&gt;CARDS;&lt;BR /&gt;1 1&lt;BR /&gt;1 2&lt;BR /&gt;1 3&lt;BR /&gt;1 4&lt;BR /&gt;1 5&lt;BR /&gt;1 6&lt;BR /&gt;2 1&lt;BR /&gt;2 2&lt;BR /&gt;2 3&lt;BR /&gt;2 4&lt;BR /&gt;2 5&lt;BR /&gt;2 6&lt;BR /&gt;3 1&lt;BR /&gt;3 2&lt;BR /&gt;3 3&lt;BR /&gt;3 4&lt;BR /&gt;3 5&lt;BR /&gt;3 6&lt;BR /&gt;4 1&lt;BR /&gt;4 2&lt;BR /&gt;4 3&lt;BR /&gt;4 4&lt;BR /&gt;4 5&lt;BR /&gt;4 6&lt;BR /&gt;5 1&lt;BR /&gt;5 2&lt;BR /&gt;5 3&lt;BR /&gt;5 4&lt;BR /&gt;5 5&lt;BR /&gt;5 6&lt;BR /&gt;6 1&lt;BR /&gt;6 2&lt;BR /&gt;6 3&lt;BR /&gt;6 4&lt;BR /&gt;6 5&lt;BR /&gt;6 6&lt;BR /&gt;;&lt;BR /&gt;proc sgplot data=auto;&lt;BR /&gt;VBAR sum_dices;&lt;BR /&gt;proc freq data=auto;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 04:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-can-I-plot-the-percentages-on-my-histogram/m-p/541288#M7339</guid>
      <dc:creator>Fara_I</dc:creator>
      <dc:date>2019-03-08T04:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I plot the percentages on my histogram?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-can-I-plot-the-percentages-on-my-histogram/m-p/541296#M7340</link>
      <description>&lt;P&gt;Go for&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=auto;&lt;BR /&gt;VBAR sum_dices / stat=percent;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 05:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-can-I-plot-the-percentages-on-my-histogram/m-p/541296#M7340</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-03-08T05:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can I plot the percentages on my histogram?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-can-I-plot-the-percentages-on-my-histogram/m-p/541445#M7371</link>
      <description>&lt;P&gt;Here is a more efficient way to create your AUTOS data set:&lt;/P&gt;
&lt;PRE&gt;DATA auto;
   do dice1= 1 to 6;
      do dice2= 1 to 6;
         sum_dices = sum(dice1, dice2);
         output;
      end;
   end;
run;&lt;/PRE&gt;
&lt;P&gt;Why do I say more efficient? Can change for 6-sided dice to any N-sided dice where N &amp;gt;= 1. Adding a third, forth or more dice is simple by just adding more do loops, one for each. You can easily examine differences involving more or different numbers of faces on dice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since 3 6-sided dice has 216 permutations that would be a lot of cards statements to get right.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 16:01:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-can-I-plot-the-percentages-on-my-histogram/m-p/541445#M7371</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-08T16:01:44Z</dc:date>
    </item>
  </channel>
</rss>

