%let name=simian; filename odsout '.'; /* In SAS/Graph, you can't get a true numeric axis for a gchart bar chart, so I'm doing the chart using gplot, and I'm "faking" bars by using line segments with the interpol=needle. Being able to do true numeric axes is especially important for the laboratory A chart (not shown in this example) since it appears to use a log axis. Drawbacks: needles are one color (can't do fill color & outline), and since a needle is a line segment you can't do html charttip/drilldown on it. */ /* For this proof-of-concept, I'm entering my data by 'barnum', and then transforming it to the 'log-difference' value. Your data would more likely have the log-difference value calculated some other way. */ data mydata; label cases='Cases (N=718)'; label controls='Controls (N=615)'; input barnum cases controls; datalines; -10 0.0 0.0 -9 0.5 -0.5 -8 0.1 -0.1 -7 0.0 0.0 -6 0.0 0.0 -5 0.2 0.0 -4 0.0 -0.7 -3 1.0 -1.0 -2 2.0 -1.7 -1 3.9 -4.0 0 7.0 -7.0 1 15.0 -13.0 2 19.0 -16.0 3 14.8 -12.5 4 8.0 -9.0 5 6.0 -5.5 6 5.0 -5.1 7 2.8 -2.5 8 2.1 -2.7 9 2.8 -2.4 10 2.1 -2.2 11 1.6 -1.6 12 1.5 -1.6 13 1.0 -1.0 14 1.1 -0.5 15 1.1 -0.5 16 1.0 -1.0 17 0.2 -0.2 18 0.2 -0.2 19 0.05 -0.1 20 0.0 -0.05 21 0.2 -0.2 22 0.2 -0.25 23 0.2 -0.25 24 0.2 -0.25 25 0.0 -0.3 26 0.0 -0.35 27 0.0 0.0 28 0.0 0.0 29 0.0 -0.2 30 0.0 -0.4 31 0.0 0.0 32 0.0 -0.2 33 0.2 0.0 34 0.1 0.0 35 0.0 0.0 36 0.0 0.0 37 0.0 0.0 38 0.0 0.0 39 0.0 0.0 40 0.1 0.0 ; run; data mydata; set mydata; log_difference_value=barnum/15; run; /* ------------------------------------------------------------------------ */ goptions device=png; goptions noborder; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="Simian virus 40 (SV40) antibody reactivity - A SAS/Graph Chart") style=htmlblue; goptions gunit=pct htitle=4.5 ftitle="albany amt/bold" htext=3.25 ftext="albany amt/bold"; axis1 label=(a=90 'Percent with value') offset=(0,0) order=(-20 to 20 by 5) minor=none /* make certain tickmarks not have a label */ value=(t=1 ' ' t=2 ' ' t=9 ' '); axis2 label=('Log-difference value') offset=(2,2) order=(-1 to 3 by 1) minor=none value=(t=1 ' ' t=5 ' '); legend1 position=(top right inside) across=1 label=none; goptions xpixels=600 ypixels=500; symbol1 interpol=needle width=6 color=gray value=none; symbol2 interpol=needle width=6 color=black value=none; title1 ls=1.5 justify=left link="Engels_SV40_NHL_case_control_study.pdf" "Laboratory B"; footnote color=gray justify=right font="albany amt" "... using rough/approximated data"; proc gplot data=mydata; plot cases*log_difference_value=1 controls*log_difference_value=2 / overlay vaxis=axis1 haxis=axis2 href=0.7 lhref=33 /* (10.5/15)=0.7 */ legend=legend1 des='' name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;