%let name=german; filename odsout '.'; /* Imitation of german plot from... http://www.imbe.med.uni-erlangen.de/lehre/Biomathematik/DeskriptiveStatistik.pdf */ data my_data; input stichprobe $ 1 value; length my_html $200; my_html= 'title='||quote( 'Stichprobe: '||trim(left(stichprobe))||'0D'x|| 'Value: '||trim(left(put(value,nlnum4.1))))|| ' href='||quote('http://www.germany-info.org/relaunch/'); cards; A 4.1 A 4.5 A 5.3 A 5.4 A 5.5 A 5.6 A 5.8 A 6.2 A 6.4 A 7.9 B 1.3 B 3.0 B 3.5 B 4.7 B 5.5 B 5.9 B 6.6 B 7.9 B 8.4 B 9.9 ; run; /* Calculate some simple statistics from the data, and store the values as macro variables, so you can use them in the footnotes. Note the use of 'locale', so that we can use the nlnum format. */ options LOCALE=German_Germany; proc sql; select count(*) format comma3.0 into :n_a from my_data where stichprobe='A'; select count(*) format comma3.0 into :n_b from my_data where stichprobe='B'; select avg(value) format nlnum4.1 into :mean_a from my_data where stichprobe='A'; select avg(value) format nlnum4.1 into :mean_b from my_data where stichprobe='B'; quit; run; proc sql; create table anno_text as select unique stichprobe from my_data; quit; run; data anno_text; set anno_text; xsys='2'; ysys='2'; hsys='3'; when='a'; x=8.3; yc=stichprobe; function='label'; position='2'; text='Stichprobe '||trim(left(stichprobe)); run; goptions device=png; goptions border; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="SAS/Graph German example") style=htmlblue; goptions gunit=pct htitle=4.2 htext=3.8 ftitle="albany amt/bold" ftext="albany amt"; axis1 label=none value=none order=('B' 'A') offset=(15,12) major=none; axis2 label=none minor=none order=(0 to 10 by 2) offset=(0,0) major=(height=-.5 cells); symbol v=circle i=none h=5.2 color=blue; title1 j=l move=(+5,+0) ls=1.5 "6.2. Streuungsmaße"; title2 j=l move=(+5,+0) "Streuungsmaße dienen der Quantifizierung des Grades"; title3 j=l move=(+5,+0) "der Variabilität der beobachteten Ausprägungen in der"; title4 j=l move=(+5,+0) "Stichprobe."; title5 h=5pct " "; title6 a=90 h=11pct " "; /* left-hand border whitespace */ title7 a=-90 h=13pct " "; /* right-hand border whitespace */ /* Have to get just a little 'tricky' to put the double-quote at the bottom, in front of the word 'kleine', and also the '-' bar over the x, etc */ footnote1 j=l move=(+5,+0) "Stichprobe A: n =&n_a; x" move=(-1.1,+1.6) '-' move=(+1,-1.6) " = &mean_a; " move=(-0,-1) '"' move=(+0,+1) 'kleine Streuung"'; footnote2 j=l move=(+5,+0) "Stichprobe B: n =&n_b; x" move=(-1.1,+1.6) '-' move=(+1,-1.6) " = &mean_b; " move=(-0,-1) '"' move=(+0,+1) 'große Streuung"'; proc gplot data=my_data anno=anno_text; plot stichprobe*value / noframe vaxis=axis1 haxis=axis2 html=my_html des='' name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;