Using the DATA Step
Graphics Interface (DSGI), you can display an image in a designated
position. To display an image, specify the file specification for
the image file in quotation marks on the GDRAW('IMAGE',...) function.
This code displays the
image in the screen coordinates (20, 20) to (40, 40). The last parameter,
FIT, indicates how to display the image.
rc=gdraw("image",
"external-image-file", 20, 20, 40, 40,
"fit");
goptions reset=all
ftext="Albany AMT/bold" htitle=1.25
hsize=5.5in vsize=4.2in;
title "DSGI with Image";
data image;
rc=ginit();
rc=graph("clear");
rc=gdraw("image","external-image-file",
5, 5, 90, 90,"tile");
rc=graph("update");
rc=gterm();
run;
quit;
If you specify the TILE
keyword for the GDRAW('IMAGE',...) function, the image is copied as
many times as needed to fill the specified area.
rc=gdraw("image","external-image-file",
5, 5, 90, 90,"tile");
If you specify the FIT
keyword for the GDRAW('IMAGE',...) function, the image is stretched
to fit within the entire area.
rc=gdraw("image","external-image-file",
5, 5, 90, 90,"fit");