%let name=comet; filename odsout '.'; /* SAS/Graph imitation of the following... http://en.wikipedia.org/wiki/Image:Comets_by_aphelion.png */ data my_data; input bucket value; datalines; 1.5 21 1.6 34 1.7 24 1.8 10 1.9 2 2.0 6 2.1 5 2.2 1 2.3 7 2.4 3 2.5 1 2.6 1 2.7 0 2.8 1 2.9 2 3.0 1 3.1 1 3.2 0 3.3 3 3.4 0 3.5 0 3.6 1 3.7 0 3.8 1 3.9 0 4.0 0 4.1 0 4.2 0 4.3 1 4.4 1 4.5 0 ; run; data my_anno; length function color $8 text $20; xsys='2'; ysys='1'; function='label'; color='black'; position='6'; angle=90; midpoint=1.6; y=100; text=' Jupiter'; output; midpoint=2.2; y=100; text=' Saturn'; output; midpoint=2.9; y=100; text=' Uranus'; output; midpoint=3.4; y=100; text=' Neptune'; output; when='b'; color='graycc'; /* there's no built-in option to draw reflines between bars, so you have to annotate them (between the 31 bars) ... */ do i = 0 to 100 by (100/31); xsys='1'; x=i; ysys='5'; y=0; function='move'; output; ysys='1'; y=100; function='draw'; output; end; do i = 5 to 35 by 5; ysys='2'; y=i-.3; xsys='1'; x=-.7; function='move'; output; color='black'; function='label'; angle=0; text=trim(left(i))||' '; position='4'; output; ysys='2'; y=i; color='gray55'; xsys='1'; x=0; function='move'; output; xsys='5'; x=2; function='draw'; output; end; run; goptions device=png; goptions xpixels=675 ypixels=650; goptions cback=white; goptions noborder; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="Comets by Aphelion (SAS/Graph chart)") style=htmlblue; goptions gunit=pct htitle=5 htext=2.5 ftitle="albany amt" ftext="albany amt"; axis1 label=(c=white "XXXXX") value=none order=(0 to 35 by 5) minor=none offset=(0,0); axis2 label=none value=(angle=90) offset=(1.2,1.2); pattern1 color=red v=solid; title1 h=5 " "; footnote1 h=1 " "; proc gchart data=my_data anno=my_anno; vbar bucket / discrete type=sum sumvar=value noframe raxis=axis1 maxis=axis2 ref=(1 to 35 by 1) cref=graycc clipref width=3 space=0 coutline=graycc des='' name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;