%let name=oc2_trials; filename odsout '.'; data oc2_data; label seconds='Time'; format seconds mmss.; do seconds=90 to 3.5*60 by 1; hours=seconds/60/60; kph=.300/hours; mph=kph*.621371; output; end; run; data oc2_data; set oc2_data; length my_html $300; my_html='title='||quote( trim(left(put(seconds,mmss.)))||' @ '||trim(left(put(kph,comma5.1)))||'kph'|| ' ('||trim(left(put(mph,comma5.1)))||' mph)'); run; data oc2_anno; input seconds text $ 5-80; hours=seconds/60/60; kph=.300/hours; datalines; 120 Team USA men 130 Above Average men 130 Elite women 140 Above Average women ; run; data oc2_anno; set oc2_anno; length function $8 color $12 style $35; xsys='2'; ysys='2'; hsys='3'; x=seconds; y=kph; function='move'; output; if index(text,'women')^=0 then do; color='hotpink'; function='draw'; size=.5; when='b'; xsys='7'; ysys='7'; x=-5; y=-5; output; function='cntl2txt'; output; x=.; y=.; function='label'; style='albany amt/bold'; position='4'; size=.; when='a'; text=trim(left(text))||'a0'x; output; end; else do; color='dodgerblue'; function='draw'; size=.5; when='b'; xsys='7'; ysys='7'; x=5; y=5; output; function='cntl2txt'; output; x=.; y=.; function='label'; style='albany amt/bold'; position='c'; size=.; when='a'; text='a0'x||trim(left(text)); output; end; run; data anno_mph_axis; length function $8 color $12; xsys='1'; ysys='2'; hsys='3'; when='a'; do mph = 0 to 7 by 1; y=mph*1.60934; x=100; function='move'; output; function='draw'; color='cxbbbbbb'; size=.01; x=x+.5; output; function='label'; position='>'; size=.; color=''; text='a0'x||trim(left(put(mph,comma5.0))); output; end; xsys='1'; ysys='1'; function='label'; position='5'; x=102; y=104; text='mph'; output; run; goptions device=png; goptions xpixels=900 ypixels=600; goptions noborder; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="OC2 time trials") style=htmlblue; goptions gunit=pct ftitle="albany amt" ftext="albany amt" htitle=4.25 htext=2.2; goptions ctext=gray33; axis1 order=('0:01:30't to '0:03:30't by '0:00:10't) minor=none value=(angle=90) style=0 offset=(0,0); axis2 label=(j=c 'Speed' j=c 'kph') order=(0 to 12 by 3) minor=none style=0 offset=(0,0); symbol1 value=circle height=1.8 color=gray88; title1 ls=1.5 "2-Person Outrigger Canoe (OC2) Time Standards, 300m"; title2 ls=1.0 "second person is passenger/steersperson, not paddling"; title3 a=-90 h=3 ' '; proc gplot data=oc2_data anno=oc2_anno; plot kph*seconds / noframe haxis=axis1 vaxis=axis2 anno=anno_mph_axis /* Since I want major & minor-looking reflines, I'm hard-coding them */ vref=( 0 1 2 3 4 5 6 7 8 9 10 11 12 ) lvref=( 1 33 33 1 33 33 1 33 33 1 33 33 1 ) cvref=graybb href=( 90 100 110 120 130 140 150 160 170 180 190 200 210 ) lhref=( 1 33 33 1 33 33 1 33 33 1 33 33 1 33 33 1 ) chref=graybb html=my_html des='' name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;