<?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: Trying to put percentage in the right vertical axis. in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Trying-to-put-percentage-in-the-right-vertical-axis/m-p/389699#M13354</link>
    <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;      
proc summary data=SASHELP.PRDSAL2 ;
  where YEAR eq 1995;
  class MONYR;
  var ACTUAL PREDICT;
  output out=SUMMARY  sum=;
run;

data PLOT;
  if _N_=1 then set SUMMARY(where=(MONYR eq .) rename=(ACTUAL=TOTAL) );
  set SUMMARY(where=(MONYR ne .) );
  retain TOTAL;
  PCT+ACTUAL/TOTAL;
  format PCT percent10.1;
run;

proc sgplot data=PLOT; 
  vbar monyr / response=ACTUAL ;
  vline monyr / response=PCT y2axis;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(modified from&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/using-second-y2axis-with-proc-sgplot-vbar/td-p/73143" target="_blank"&gt;https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/using-second-y2axis-with-proc-sgplot-vbar/td-p/73143&lt;/A&gt;)&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="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/14578i365166F76FC1A590/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Aug 2017 02:10:08 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2017-08-22T02:10:08Z</dc:date>
    <item>
      <title>Trying to put percentage in the right vertical axis.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Trying-to-put-percentage-in-the-right-vertical-axis/m-p/388945#M13327</link>
      <description>&lt;P&gt;Good day! So I'm learning to use SAS and I've been all day trying to put percentages in the y axis, but the right one. My current graph already uses reflines but&amp;nbsp;I want to replace the reflines for a percentage scale from 0 to 100% in 10 by 10. Is there a way to do it?&lt;/P&gt;&lt;P&gt;I'm on SAS 9.3&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sin título.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/14542iF7FA80BF34D01288/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sin título.png" alt="Sin título.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="branch"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 17 Aug 2017 19:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Trying-to-put-percentage-in-the-right-vertical-axis/m-p/388945#M13327</guid>
      <dc:creator>ldavidr</dc:creator>
      <dc:date>2017-08-17T19:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to put percentage in the right vertical axis.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Trying-to-put-percentage-in-the-right-vertical-axis/m-p/388946#M13328</link>
      <description>Probably. Post your code. Including sample data to allow us to replicate your graph would help, use the SASHELP datasets if necessary.&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Aug 2017 19:43:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Trying-to-put-percentage-in-the-right-vertical-axis/m-p/388946#M13328</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-17T19:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to put percentage in the right vertical axis.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Trying-to-put-percentage-in-the-right-vertical-axis/m-p/389699#M13354</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;      
proc summary data=SASHELP.PRDSAL2 ;
  where YEAR eq 1995;
  class MONYR;
  var ACTUAL PREDICT;
  output out=SUMMARY  sum=;
run;

data PLOT;
  if _N_=1 then set SUMMARY(where=(MONYR eq .) rename=(ACTUAL=TOTAL) );
  set SUMMARY(where=(MONYR ne .) );
  retain TOTAL;
  PCT+ACTUAL/TOTAL;
  format PCT percent10.1;
run;

proc sgplot data=PLOT; 
  vbar monyr / response=ACTUAL ;
  vline monyr / response=PCT y2axis;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(modified from&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/using-second-y2axis-with-proc-sgplot-vbar/td-p/73143" target="_blank"&gt;https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/using-second-y2axis-with-proc-sgplot-vbar/td-p/73143&lt;/A&gt;)&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="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/14578i365166F76FC1A590/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 02:10:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Trying-to-put-percentage-in-the-right-vertical-axis/m-p/389699#M13354</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-08-22T02:10:08Z</dc:date>
    </item>
  </channel>
</rss>

