<?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 to code the graph I want? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/298038#M10548</link>
    <description>thank you so much!</description>
    <pubDate>Tue, 13 Sep 2016 13:46:53 GMT</pubDate>
    <dc:creator>zhangda</dc:creator>
    <dc:date>2016-09-13T13:46:53Z</dc:date>
    <item>
      <title>How to get the graph as attached?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/297828#M10531</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code, however, could not figure out how to improve&amp;nbsp;it&amp;nbsp;&lt;SPAN&gt;in order to get the&amp;nbsp;graph as attached. Thank you so much!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;goptions reset=all cback=white border htitle=12pt htext=10pt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ds1;&lt;/P&gt;&lt;P&gt;input year $ mid $ resp exp rev;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;null d_2016 0.45 0.45 0.35&lt;/P&gt;&lt;P&gt;null d_2015 0.35 0.45 0.35&lt;/P&gt;&lt;P&gt;s_300 d_2016 0.65 0.65 0.55&lt;/P&gt;&lt;P&gt;s_300 d_2015 0.55 0.65 0.55&lt;/P&gt;&lt;P&gt;s_640 d_2016 0.42 0.42 0.65&lt;/P&gt;&lt;P&gt;s_640 d_2015 0.65 0.42 0.65&lt;/P&gt;&lt;P&gt;s_670 d_2016 0.35 0.35 0.75&lt;/P&gt;&lt;P&gt;s_670 d_2015 0.75 0.35 0.75&lt;/P&gt;&lt;P&gt;s_700 d_2016 0.83 0.83 0.47&lt;/P&gt;&lt;P&gt;s_700 d_2015 0.47 0.83 0.47&lt;/P&gt;&lt;P&gt;s_730 d_2016 0.48 0.48 0.58&lt;/P&gt;&lt;P&gt;s_730 d_2015 0.58 0.48 0.58&lt;/P&gt;&lt;P&gt;s_760 d_2016 0.67 0.67 0.69&lt;/P&gt;&lt;P&gt;s_760 d_2015 0.69 0.67 0.69&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ds2;&lt;/P&gt;&lt;P&gt;set ds1;&lt;/P&gt;&lt;P&gt;n=_n_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set ds2 end=eof;&lt;/P&gt;&lt;P&gt;if eof then call symput('skip',left(n));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort;&lt;/P&gt;&lt;P&gt;by year mid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data anno;&lt;/P&gt;&lt;P&gt;set ds2;&lt;/P&gt;&lt;P&gt;by year mid;&lt;/P&gt;&lt;P&gt;length function color $8 text $20 style $ 20;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Populate the table */&lt;/P&gt;&lt;P&gt;if first.year then do;&lt;/P&gt;&lt;P&gt;function='move'; xsys='2'; ysys='1';&lt;/P&gt;&lt;P&gt;midpoint=mid; group=year; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='cntl2txt'; output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='A'; ysys='3';&lt;/P&gt;&lt;P&gt;x=+2; y=13;&lt;/P&gt;&lt;P&gt;text=trim(left(put(exp,8.1)));&lt;/P&gt;&lt;P&gt;color='black'; position='+'; when='a';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='move'; xsys='2'; ysys='1';&lt;/P&gt;&lt;P&gt;midpoint=mid; group=year; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='cntl2txt'; output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='A'; ysys='3';&lt;/P&gt;&lt;P&gt;x=+2; y=9;&lt;/P&gt;&lt;P&gt;text=trim(left(put(rev,8.1)));&lt;/P&gt;&lt;P&gt;color='black'; position='+'; when='a';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generate the table frame */&lt;/P&gt;&lt;P&gt;function='move'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;x=3; y=6;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='bar'; xsys='1'; ysys='3';&lt;/P&gt;&lt;P&gt;x=100; y=15;&lt;/P&gt;&lt;P&gt;style='empty'; color='black'; line=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generate the row headers */&lt;/P&gt;&lt;P&gt;function='label'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;style='marker'; text='U'; color='cx7c95ca';&lt;/P&gt;&lt;P&gt;x=3; y=13; position='6';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;style='"Albany AMT"'; text='d_2015'; color='black';&lt;/P&gt;&lt;P&gt;x=6; y=13; position='6';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;style='marker'; text='U'; color='cxde7e6f';&lt;/P&gt;&lt;P&gt;x=3; y=8.5; position='6';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;style='"Albany AMT"'; text='d_2016'; color='black';&lt;/P&gt;&lt;P&gt;x=6; y=9; position='6';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generate the vertical lines in the table */&lt;/P&gt;&lt;P&gt;function='move'; xsys='1'; ysys='1';&lt;/P&gt;&lt;P&gt;x=0; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='draw'; xsys='1'; ysys='3';&lt;/P&gt;&lt;P&gt;x=0; y=6;&lt;/P&gt;&lt;P&gt;line=1; color='black';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='move'; xsys='1'; ysys='1';&lt;/P&gt;&lt;P&gt;x=100; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='draw'; xsys='1'; ysys='3';&lt;/P&gt;&lt;P&gt;x=100; y=6;&lt;/P&gt;&lt;P&gt;line=1; color='black';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if first.year and n ^=&amp;amp;skip then do;&lt;/P&gt;&lt;P&gt;function='move'; xsys='2'; ysys='1';&lt;/P&gt;&lt;P&gt;midpoint=mid; y=0; group=year;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='move'; xsys='A'; ysys='1';&lt;/P&gt;&lt;P&gt;x=+15.5; x=+8; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='draw'; xsys='A'; ysys='3';&lt;/P&gt;&lt;P&gt;x=+0; y=6;&lt;/P&gt;&lt;P&gt;color='black'; line=1;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generate the horizontal line in the table */&lt;/P&gt;&lt;P&gt;function='move'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;x=3; y=10.5;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='draw'; xsys='1'; ysys='3';&lt;/P&gt;&lt;P&gt;x=100; y=10.5;&lt;/P&gt;&lt;P&gt;line=1; color='black';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;title1 'Score distribution';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;axis1 label=(a=90 'Percentegy')&lt;/P&gt;&lt;P&gt;order=(0 to 1 by 0.1)&lt;/P&gt;&lt;P&gt;minor=none;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;axis2 label=none&lt;/P&gt;&lt;P&gt;value=none&lt;/P&gt;&lt;P&gt;origin=(20pct,22pct)&lt;/P&gt;&lt;P&gt;offset=(4pct,4pct);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;axis3 label=none;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;footnote1 'Fiscal Year';&lt;/P&gt;&lt;P&gt;footnote2 h=.5 ' ';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pattern1 value=solid color=cx7c95ca;&lt;/P&gt;&lt;P&gt;pattern2 value=solid color=cxde7e6f;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc gchart data=ds2;&lt;/P&gt;&lt;P&gt;vbar mid / sumvar=resp group=year&lt;/P&gt;&lt;P&gt;coutline=black patternid=midpoint&lt;/P&gt;&lt;P&gt;space=0 gspace=0 width=5&lt;/P&gt;&lt;P&gt;cframe=ltgray autoref clipref&lt;/P&gt;&lt;P&gt;raxis=axis1 maxis=axis2 gaxis=axis3&lt;/P&gt;&lt;P&gt;annotate=anno;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;ods graphics / reset width=5in height=3in attrpriority=color;&lt;BR /&gt;title 'Overall Distribution';&lt;BR /&gt;proc sgplot data=ds1 noborder noautolegend;&lt;BR /&gt;styleattrs wallcolor=cxf0f0f0;&lt;BR /&gt;vbarparm category=year response=resp / group=mid groupdisplay=cluster&lt;BR /&gt;clusterwidth=0.6 outlineattrs=(color=black)&lt;BR /&gt;baselineattrs=(thickness=0);&lt;BR /&gt;series x=year y=exp / group=mid lineattrs=(color=gold thickness=2) y2axis;&lt;BR /&gt;series x=year y=rev / group=mid lineattrs=(color=green thickness=2) y2axis;&lt;BR /&gt;xaxistable resp / class=mid colorgroup=mid;&lt;BR /&gt;xaxis display=(noline noticks nolabel) ;&lt;BR /&gt;yaxis display=(noline noticks) grid gridattrs=(color=white thickness=1) offsetmin=0;&lt;BR /&gt;y2axis display=(noline noticks) min=0;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 18:26:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/297828#M10531</guid>
      <dc:creator>zhangda</dc:creator>
      <dc:date>2016-09-12T18:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the graph as attached?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/297839#M10532</link>
      <description>&lt;P&gt;No graph attached...&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 19:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/297839#M10532</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-09-12T19:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the graph as attached?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/297842#M10533</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code, however, could not figure out how to improve&amp;nbsp;it&amp;nbsp;&lt;SPAN&gt;in order to get the&amp;nbsp;graph as attached. Thank you so much!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;goptions reset=all cback=white border htitle=12pt htext=10pt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ds1;&lt;/P&gt;&lt;P&gt;input year $ mid $ resp exp rev;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;null d_2016 0.45 0.45 0.35&lt;/P&gt;&lt;P&gt;null d_2015 0.35 0.45 0.35&lt;/P&gt;&lt;P&gt;s_300 d_2016 0.65 0.65 0.55&lt;/P&gt;&lt;P&gt;s_300 d_2015 0.55 0.65 0.55&lt;/P&gt;&lt;P&gt;s_640 d_2016 0.42 0.42 0.65&lt;/P&gt;&lt;P&gt;s_640 d_2015 0.65 0.42 0.65&lt;/P&gt;&lt;P&gt;s_670 d_2016 0.35 0.35 0.75&lt;/P&gt;&lt;P&gt;s_670 d_2015 0.75 0.35 0.75&lt;/P&gt;&lt;P&gt;s_700 d_2016 0.83 0.83 0.47&lt;/P&gt;&lt;P&gt;s_700 d_2015 0.47 0.83 0.47&lt;/P&gt;&lt;P&gt;s_730 d_2016 0.48 0.48 0.58&lt;/P&gt;&lt;P&gt;s_730 d_2015 0.58 0.48 0.58&lt;/P&gt;&lt;P&gt;s_760 d_2016 0.67 0.67 0.69&lt;/P&gt;&lt;P&gt;s_760 d_2015 0.69 0.67 0.69&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ds2;&lt;/P&gt;&lt;P&gt;set ds1;&lt;/P&gt;&lt;P&gt;n=_n_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set ds2 end=eof;&lt;/P&gt;&lt;P&gt;if eof then call symput('skip',left(n));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort;&lt;/P&gt;&lt;P&gt;by year mid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data anno;&lt;/P&gt;&lt;P&gt;set ds2;&lt;/P&gt;&lt;P&gt;by year mid;&lt;/P&gt;&lt;P&gt;length function color $8 text $20 style $ 20;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Populate the table */&lt;/P&gt;&lt;P&gt;if first.year then do;&lt;/P&gt;&lt;P&gt;function='move'; xsys='2'; ysys='1';&lt;/P&gt;&lt;P&gt;midpoint=mid; group=year; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='cntl2txt'; output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='A'; ysys='3';&lt;/P&gt;&lt;P&gt;x=+2; y=13;&lt;/P&gt;&lt;P&gt;text=trim(left(put(exp,8.1)));&lt;/P&gt;&lt;P&gt;color='black'; position='+'; when='a';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='move'; xsys='2'; ysys='1';&lt;/P&gt;&lt;P&gt;midpoint=mid; group=year; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='cntl2txt'; output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='A'; ysys='3';&lt;/P&gt;&lt;P&gt;x=+2; y=9;&lt;/P&gt;&lt;P&gt;text=trim(left(put(rev,8.1)));&lt;/P&gt;&lt;P&gt;color='black'; position='+'; when='a';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generate the table frame */&lt;/P&gt;&lt;P&gt;function='move'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;x=3; y=6;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='bar'; xsys='1'; ysys='3';&lt;/P&gt;&lt;P&gt;x=100; y=15;&lt;/P&gt;&lt;P&gt;style='empty'; color='black'; line=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generate the row headers */&lt;/P&gt;&lt;P&gt;function='label'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;style='marker'; text='U'; color='cx7c95ca';&lt;/P&gt;&lt;P&gt;x=3; y=13; position='6';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;style='"Albany AMT"'; text='d_2015'; color='black';&lt;/P&gt;&lt;P&gt;x=6; y=13; position='6';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;style='marker'; text='U'; color='cxde7e6f';&lt;/P&gt;&lt;P&gt;x=3; y=8.5; position='6';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;style='"Albany AMT"'; text='d_2016'; color='black';&lt;/P&gt;&lt;P&gt;x=6; y=9; position='6';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generate the vertical lines in the table */&lt;/P&gt;&lt;P&gt;function='move'; xsys='1'; ysys='1';&lt;/P&gt;&lt;P&gt;x=0; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='draw'; xsys='1'; ysys='3';&lt;/P&gt;&lt;P&gt;x=0; y=6;&lt;/P&gt;&lt;P&gt;line=1; color='black';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='move'; xsys='1'; ysys='1';&lt;/P&gt;&lt;P&gt;x=100; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='draw'; xsys='1'; ysys='3';&lt;/P&gt;&lt;P&gt;x=100; y=6;&lt;/P&gt;&lt;P&gt;line=1; color='black';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if first.year and n ^=&amp;amp;skip then do;&lt;/P&gt;&lt;P&gt;function='move'; xsys='2'; ysys='1';&lt;/P&gt;&lt;P&gt;midpoint=mid; y=0; group=year;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='move'; xsys='A'; ysys='1';&lt;/P&gt;&lt;P&gt;x=+15.5; x=+8; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='draw'; xsys='A'; ysys='3';&lt;/P&gt;&lt;P&gt;x=+0; y=6;&lt;/P&gt;&lt;P&gt;color='black'; line=1;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generate the horizontal line in the table */&lt;/P&gt;&lt;P&gt;function='move'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;x=3; y=10.5;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='draw'; xsys='1'; ysys='3';&lt;/P&gt;&lt;P&gt;x=100; y=10.5;&lt;/P&gt;&lt;P&gt;line=1; color='black';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;title1 'Score distribution';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;axis1 label=(a=90 'Percentegy')&lt;/P&gt;&lt;P&gt;order=(0 to 1 by 0.1)&lt;/P&gt;&lt;P&gt;minor=none;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;axis2 label=none&lt;/P&gt;&lt;P&gt;value=none&lt;/P&gt;&lt;P&gt;origin=(20pct,22pct)&lt;/P&gt;&lt;P&gt;offset=(4pct,4pct);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;axis3 label=none;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;footnote1 'Fiscal Year';&lt;/P&gt;&lt;P&gt;footnote2 h=.5 ' ';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pattern1 value=solid color=cx7c95ca;&lt;/P&gt;&lt;P&gt;pattern2 value=solid color=cxde7e6f;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc gchart data=ds2;&lt;/P&gt;&lt;P&gt;vbar mid / sumvar=resp group=year&lt;/P&gt;&lt;P&gt;coutline=black patternid=midpoint&lt;/P&gt;&lt;P&gt;space=0 gspace=0 width=5&lt;/P&gt;&lt;P&gt;cframe=ltgray autoref clipref&lt;/P&gt;&lt;P&gt;raxis=axis1 maxis=axis2 gaxis=axis3&lt;/P&gt;&lt;P&gt;annotate=anno;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;ods graphics / reset width=5in height=3in attrpriority=color;&lt;BR /&gt;title 'Overall Distribution';&lt;BR /&gt;proc sgplot data=ds1 noborder noautolegend;&lt;BR /&gt;styleattrs wallcolor=cxf0f0f0;&lt;BR /&gt;vbarparm category=year response=resp / group=mid groupdisplay=cluster&lt;BR /&gt;clusterwidth=0.6 outlineattrs=(color=black)&lt;BR /&gt;baselineattrs=(thickness=0);&lt;BR /&gt;series x=year y=exp / group=mid lineattrs=(color=gold thickness=2) y2axis;&lt;BR /&gt;series x=year y=rev / group=mid lineattrs=(color=green thickness=2) y2axis;&lt;BR /&gt;xaxistable resp / class=mid colorgroup=mid;&lt;BR /&gt;xaxis display=(noline noticks nolabel) ;&lt;BR /&gt;yaxis display=(noline noticks) grid gridattrs=(color=white thickness=1) offsetmin=0;&lt;BR /&gt;y2axis display=(noline noticks) min=0;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 19:29:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/297842#M10533</guid>
      <dc:creator>zhangda</dc:creator>
      <dc:date>2016-09-12T19:29:04Z</dc:date>
    </item>
    <item>
      <title>how to code the graph I want?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/297852#M10544</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code, however, could not figure out how to improve&amp;nbsp;it&amp;nbsp;&lt;SPAN&gt;in order to get the&amp;nbsp;graph as attached. Thank you so much!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;goptions reset=all cback=white border htitle=12pt htext=10pt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ds1;&lt;/P&gt;&lt;P&gt;input year $ mid $ resp exp rev;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;null d_2016 0.45 0.45 0.35&lt;/P&gt;&lt;P&gt;null d_2015 0.35 0.45 0.35&lt;/P&gt;&lt;P&gt;s_300 d_2016 0.65 0.65 0.55&lt;/P&gt;&lt;P&gt;s_300 d_2015 0.55 0.65 0.55&lt;/P&gt;&lt;P&gt;s_640 d_2016 0.42 0.42 0.65&lt;/P&gt;&lt;P&gt;s_640 d_2015 0.65 0.42 0.65&lt;/P&gt;&lt;P&gt;s_670 d_2016 0.35 0.35 0.75&lt;/P&gt;&lt;P&gt;s_670 d_2015 0.75 0.35 0.75&lt;/P&gt;&lt;P&gt;s_700 d_2016 0.83 0.83 0.47&lt;/P&gt;&lt;P&gt;s_700 d_2015 0.47 0.83 0.47&lt;/P&gt;&lt;P&gt;s_730 d_2016 0.48 0.48 0.58&lt;/P&gt;&lt;P&gt;s_730 d_2015 0.58 0.48 0.58&lt;/P&gt;&lt;P&gt;s_760 d_2016 0.67 0.67 0.69&lt;/P&gt;&lt;P&gt;s_760 d_2015 0.69 0.67 0.69&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ds2;&lt;/P&gt;&lt;P&gt;set ds1;&lt;/P&gt;&lt;P&gt;n=_n_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set ds2 end=eof;&lt;/P&gt;&lt;P&gt;if eof then call symput('skip',left(n));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort;&lt;/P&gt;&lt;P&gt;by year mid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data anno;&lt;/P&gt;&lt;P&gt;set ds2;&lt;/P&gt;&lt;P&gt;by year mid;&lt;/P&gt;&lt;P&gt;length function color $8 text $20 style $ 20;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Populate the table */&lt;/P&gt;&lt;P&gt;if first.year then do;&lt;/P&gt;&lt;P&gt;function='move'; xsys='2'; ysys='1';&lt;/P&gt;&lt;P&gt;midpoint=mid; group=year; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='cntl2txt'; output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='A'; ysys='3';&lt;/P&gt;&lt;P&gt;x=+2; y=13;&lt;/P&gt;&lt;P&gt;text=trim(left(put(exp,8.1)));&lt;/P&gt;&lt;P&gt;color='black'; position='+'; when='a';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='move'; xsys='2'; ysys='1';&lt;/P&gt;&lt;P&gt;midpoint=mid; group=year; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='cntl2txt'; output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='A'; ysys='3';&lt;/P&gt;&lt;P&gt;x=+2; y=9;&lt;/P&gt;&lt;P&gt;text=trim(left(put(rev,8.1)));&lt;/P&gt;&lt;P&gt;color='black'; position='+'; when='a';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generate the table frame */&lt;/P&gt;&lt;P&gt;function='move'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;x=3; y=6;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='bar'; xsys='1'; ysys='3';&lt;/P&gt;&lt;P&gt;x=100; y=15;&lt;/P&gt;&lt;P&gt;style='empty'; color='black'; line=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generate the row headers */&lt;/P&gt;&lt;P&gt;function='label'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;style='marker'; text='U'; color='cx7c95ca';&lt;/P&gt;&lt;P&gt;x=3; y=13; position='6';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;style='"Albany AMT"'; text='d_2015'; color='black';&lt;/P&gt;&lt;P&gt;x=6; y=13; position='6';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;style='marker'; text='U'; color='cxde7e6f';&lt;/P&gt;&lt;P&gt;x=3; y=8.5; position='6';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='label'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;style='"Albany AMT"'; text='d_2016'; color='black';&lt;/P&gt;&lt;P&gt;x=6; y=9; position='6';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generate the vertical lines in the table */&lt;/P&gt;&lt;P&gt;function='move'; xsys='1'; ysys='1';&lt;/P&gt;&lt;P&gt;x=0; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='draw'; xsys='1'; ysys='3';&lt;/P&gt;&lt;P&gt;x=0; y=6;&lt;/P&gt;&lt;P&gt;line=1; color='black';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='move'; xsys='1'; ysys='1';&lt;/P&gt;&lt;P&gt;x=100; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='draw'; xsys='1'; ysys='3';&lt;/P&gt;&lt;P&gt;x=100; y=6;&lt;/P&gt;&lt;P&gt;line=1; color='black';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if first.year and n ^=&amp;amp;skip then do;&lt;/P&gt;&lt;P&gt;function='move'; xsys='2'; ysys='1';&lt;/P&gt;&lt;P&gt;midpoint=mid; y=0; group=year;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='move'; xsys='A'; ysys='1';&lt;/P&gt;&lt;P&gt;x=+15.5; x=+8; y=0;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='draw'; xsys='A'; ysys='3';&lt;/P&gt;&lt;P&gt;x=+0; y=6;&lt;/P&gt;&lt;P&gt;color='black'; line=1;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generate the horizontal line in the table */&lt;/P&gt;&lt;P&gt;function='move'; xsys='3'; ysys='3';&lt;/P&gt;&lt;P&gt;x=3; y=10.5;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;function='draw'; xsys='1'; ysys='3';&lt;/P&gt;&lt;P&gt;x=100; y=10.5;&lt;/P&gt;&lt;P&gt;line=1; color='black';&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;title1 'Score distribution';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;axis1 label=(a=90 'Percentegy')&lt;/P&gt;&lt;P&gt;order=(0 to 1 by 0.1)&lt;/P&gt;&lt;P&gt;minor=none;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;axis2 label=none&lt;/P&gt;&lt;P&gt;value=none&lt;/P&gt;&lt;P&gt;origin=(20pct,22pct)&lt;/P&gt;&lt;P&gt;offset=(4pct,4pct);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;axis3 label=none;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;footnote1 'Fiscal Year';&lt;/P&gt;&lt;P&gt;footnote2 h=.5 ' ';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pattern1 value=solid color=cx7c95ca;&lt;/P&gt;&lt;P&gt;pattern2 value=solid color=cxde7e6f;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc gchart data=ds2;&lt;/P&gt;&lt;P&gt;vbar mid / sumvar=resp group=year&lt;/P&gt;&lt;P&gt;coutline=black patternid=midpoint&lt;/P&gt;&lt;P&gt;space=0 gspace=0 width=5&lt;/P&gt;&lt;P&gt;cframe=ltgray autoref clipref&lt;/P&gt;&lt;P&gt;raxis=axis1 maxis=axis2 gaxis=axis3&lt;/P&gt;&lt;P&gt;annotate=anno;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;ods graphics / reset width=5in height=3in attrpriority=color;&lt;BR /&gt;title 'Overall Distribution';&lt;BR /&gt;proc sgplot data=ds1 noborder noautolegend;&lt;BR /&gt;styleattrs wallcolor=cxf0f0f0;&lt;BR /&gt;vbarparm category=year response=resp / group=mid groupdisplay=cluster&lt;BR /&gt;clusterwidth=0.6 outlineattrs=(color=black)&lt;BR /&gt;baselineattrs=(thickness=0);&lt;BR /&gt;series x=year y=exp / group=mid lineattrs=(color=gold thickness=2) y2axis;&lt;BR /&gt;series x=year y=rev / group=mid lineattrs=(color=green thickness=2) y2axis;&lt;BR /&gt;xaxistable resp / class=mid colorgroup=mid;&lt;BR /&gt;xaxis display=(noline noticks nolabel) ;&lt;BR /&gt;yaxis display=(noline noticks) grid gridattrs=(color=white thickness=1) offsetmin=0;&lt;BR /&gt;y2axis display=(noline noticks) min=0;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 20:14:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/297852#M10544</guid>
      <dc:creator>zhangda</dc:creator>
      <dc:date>2016-09-12T20:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the graph as attached?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/297897#M10540</link>
      <description>&lt;P&gt;Since you have SAS 9.4, you can use AxisTable as shown here to create your graph:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2016/07/17/graph-table-with-class/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/2016/07/17/graph-table-with-class/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 03:02:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/297897#M10540</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-09-13T03:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to code the graph I want?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/297992#M10545</link>
      <description>&lt;P&gt;Have a look at this blog:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has many examples of graphs. &amp;nbsp;Am not sure why you have all the code there, just get your data correct and in a good strcuture, and it should all be possble in one sgplot statement.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 12:27:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/297992#M10545</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-09-13T12:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to code the graph I want?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/298038#M10548</link>
      <description>thank you so much!</description>
      <pubDate>Tue, 13 Sep 2016 13:46:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-graph-as-attached/m-p/298038#M10548</guid>
      <dc:creator>zhangda</dc:creator>
      <dc:date>2016-09-13T13:46:53Z</dc:date>
    </item>
  </channel>
</rss>

