OK. This one ?
/*Example 2*/
ods listing gpath="%sysfunc(pathname(work))" image_dpi=300 style=htmlblue;
ods graphics / reset=all imagename='sepallength' noborder width=77px height=77px;
ods html exclude sgplot;
/*generate a histogram graph*/
title;
proc sgplot data=sashelp.iris pad=0 noborder noautolegend;
histogram sepallength ;
xaxis display=none;
yaxis display=none;
run;
ods listing gpath="%sysfunc(pathname(work))" image_dpi=300 style=htmlblue;
ods graphics / reset=all imagename='petallength' noborder width=77px height=77px;
ods html exclude sgplot;
/*generate a histogram graph*/
title;
proc sgplot data=sashelp.iris pad=0 noborder noautolegend;
histogram petallength ;
xaxis display=none;
yaxis display=none;
run;
%sganno
data sganno;
%SGIMAGE(IMAGE="%sysfunc(pathname(work))\sepallength.png",ANCHOR="topleft",BORDER="FALSE",DRAWSPACE="LAYOUTPERCENT" ,x1=5,y1=94)
%SGIMAGE(IMAGE="%sysfunc(pathname(work))\petallength.png",ANCHOR="topleft",BORDER="FALSE",DRAWSPACE="LAYOUTPERCENT" ,x1=51,y1=48)
/*get rid of the tick markers around histogram*/
%SGRECTANGLE(X1=10,
Y1=91.9,
HEIGHT=2,
WIDTH=40,
ANCHOR="TOPLEFT" ,
DISPLAY="FILL" , /*DISPLAY="ALL"*/
DRAWSPACE="GRAPHPERCENT",
FILLCOLOR="white" ,
HEIGHTUNIT="PERCENT" ,
WIDTHUNIT="PERCENT"
)
%SGRECTANGLE(X1=8.1,
Y1=90,
HEIGHT=40,
WIDTH=2,
ANCHOR="TOPLEFT" ,
DISPLAY="FILL" , /*DISPLAY="ALL"*/
DRAWSPACE="GRAPHPERCENT",
FILLCOLOR="white" ,
HEIGHTUNIT="PERCENT" ,
WIDTHUNIT="PERCENT"
)
%SGRECTANGLE(X1=50,
Y1=10.2,
HEIGHT=2,
WIDTH=40,
ANCHOR="TOPLEFT" ,
DISPLAY="FILL" , /*DISPLAY="ALL"*/
DRAWSPACE="GRAPHPERCENT",
FILLCOLOR="white" ,
HEIGHTUNIT="PERCENT" ,
WIDTHUNIT="PERCENT"
)
%SGRECTANGLE(X1=89.8,
Y1=50,
HEIGHT=40,
WIDTH=2,
ANCHOR="TOPLEFT" ,
DISPLAY="FILL" , /*DISPLAY="ALL"*/
DRAWSPACE="GRAPHPERCENT",
FILLCOLOR="white" ,
HEIGHTUNIT="PERCENT" ,
WIDTHUNIT="PERCENT"
)
/*Add X an Y variable label*/
%SGTEXT(
LABEL="Sepal Length (mm)",
WIDTH=40,
WIDTHUNIT= "PERCENT" ,
ANCHOR="CENTER" ,
BORDER="FALSE",
DRAWSPACE="GRAPHPERCENT",
TEXTSIZE=12,
X1=30,
Y1=95
)
%SGTEXT(
LABEL="Petal Length (mm)",
WIDTH=40,
WIDTHUNIT= "PERCENT" ,
ANCHOR="CENTER" ,
BORDER="FALSE",
DRAWSPACE="GRAPHPERCENT",
TEXTSIZE=12,
X1=70,
Y1=95
)
%SGTEXT(
ROTATE=90,
LABEL="Sepal Length (mm)",
WIDTH=40,
WIDTHUNIT= "PERCENT" ,
ANCHOR="CENTER" ,
BORDER="FALSE",
DRAWSPACE="GRAPHPERCENT",
TEXTSIZE=12,
X1=4,
Y1=75
)
%SGTEXT(
ROTATE=90,
LABEL="Petal Length (mm)",
WIDTH=40,
WIDTHUNIT= "PERCENT" ,
ANCHOR="CENTER" ,
BORDER="FALSE",
DRAWSPACE="GRAPHPERCENT",
TEXTSIZE=12,
X1=4,
Y1=25
)
run;
ods graphics/reset;
title;
proc sgscatter data=sashelp.iris sganno=sganno pad=40px;
matrix sepallength petallength;
run;
... View more