Hi stat.
I've already had a similar question, and there are two ways to solve it :
1) using proc GCHART for the bar chart and adding an ANNOTATE dataset for the scatter plot
2) using a template graphics written in GTL (experimental in 9.1.3, production with a slightly different syntax in 9.2).
Sample codes for both, below.
[pre]
%LET table = work.test ;
%LET group = trt ;
%LET y = value ;
/*******************************************/
DATA work.anno (DROP = &group &y) ;
SET &table ;
xsys = "2" ; ysys = "2" ; when = "A" ; function = "SYMBOL" ; text = "PLUS" ;
xc = STRIP(&group) ;
y = &y ;
RUN ;
PROC GCHART DATA = &table ;
VBAR &group / DISCRETE TYPE = MEAN SUMVAR = &y ANNOTATE = work.anno ;
RUN ; QUIT ;
[/pre]
Note that you may have to define an AXIS statement to show all values. My suggestion is you collect max and min for your response variable in macro variables and use them in an AXIS definition.
2nd method, using GTL
[pre]
PROC TEMPLATE ;
DEFINE statGraph barScatter ;
DYNAMIC group y mean ;
LAYOUT OVERLAY ;
BARCHARTPARM X=group Y=mean ;
SCATTER X=group Y=y ;
ENDLAYOUT ;
END ;
RUN ;
PROC SQL ;
CREATE TABLE work.data AS
SELECT *, MEAN(&y) AS y_mean
FROM &table
GROUP BY &group
;
QUIT ;
ODS HTML GPATH="c:\temp" ;
DATA _NULL_ ;
SET work.data ;
FILE PRINT ODS=(TEMPLATE="barScatter" DYNAMIC=(group="&group" y="&y" mean="y_mean")) ;
PUT _ODS_ ;
RUN ;
ODS HTML CLOSE ;
[/pre]
Good luck !
Olivier