%let name=example18; filename odsout '.'; /* Imitation of a graph from http://biomed.brown.edu/Courses/BI108/BI108_2005_Groups/02/mortality.htm */ goptions reset=global; data my_data; input year male_deaths female_deaths; datalines; 1979 496.676 466.361 1980 506.154 487.194 1981 496.59 481.104 1982 491.564 480.988 1983 494.841 491.291 1984 487.461 490.71 1985 487.453 495.286 1986 477.968 494.949 1987 472.445 495.989 1988 473.119 500.85 1989 453.057 483.1 1990 444.763 475.482 1991 443.673 476.809 1992 441.233 476.675 1993 454.352 497.858 1994 449.1 495.675 1995 452.452 503.139 1996 450.761 503.646 1997 447.687 500.725 1998 443.221 501.741 1999 443.541 510.798 2000 437.893 503.633 2001 430.046 496.953 2002 431.626 491.713 ; run; data my_data; set my_data; length myhtml $500; myhtml='title='|| quote( trim(left(year))||'0D'x|| trim(left(put(male_deaths*1000,comma9.0)))||' Male Deaths'||'0D'x|| trim(left(put(female_deaths*1000,comma9.0)))||' Female Deaths')|| ' href="http://biomed.brown.edu/Courses/BI108/BI108_2005_Groups/02/mortality.htm"'; run; data anno_gap; xsys='1'; ysys='1'; hsys='3'; position='5'; function='label'; size=7; angle=-33; x=1; y=10; text='/'; output; x=1; y= 7; text='/'; output; run; GOPTIONS DEVICE=png; goptions border; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="SAS/Graph chart of Mortality Trends") style=htmlblue; goptions ftitle="albany amt/bold" ftext="albany amt" gunit=pct htitle=4 htext=3; goptions cback=cxD1D1D1; axis1 order=(400 to 520 by 20) minor=none label=(a=90 'Deaths in Thousands') offset=(10,0); axis2 order=(1979 to 2002 by 1) major=(height=.1) minor=none offset=(3,3) label=(justify=left 'Year') value=('1979' '' '81' '' '83' '' '85' '' '87' '' '89' '' '91' '' '93' '' '95' '' '97' '' '99' '' '01' ''); symbol1 i=join c=black v=none w=7; symbol2 i=join c=white v=none w=3; symbol3 i=none c=black f=markere v='W' h=.9; symbol4 i=join c=black v=none w=7; symbol5 i=join c=red v=none w=3; symbol6 i=none c=black f=markere v='W' h=.9; title ls=0.5 justify=left " Cardiovascular Disease Mortality Trends"; title2 ls=0.5 justify=left font="albany amt/bold" height=4 " for Males and Females"; title3 ls=0.5 justify=left " United States: 1979-2002"; title4 a=90 h=2 " "; title5 a=-90 h=6 " "; footnote f=marker h=3pct c=red 'U' f=markere move=(-2.25,-0) c=black 'U' f="albany amt" h=3.5pct c=black " Males " f=marker h=3pct c=white 'U' f=markere move=(-2.25,-0) c=black 'U' f="albany amt" h=3.5pct c=black " Females"; proc gplot data=my_data anno=anno_gap; plot female_deaths*year=1 female_deaths*year=2 female_deaths*year=3 male_deaths*year=4 male_deaths*year=5 male_deaths*year=6 / overlay noframe vaxis=axis1 haxis=axis2 autovref cvref=grayaa lvref=1 html=myhtml nolegend des="" name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;