I have used Richard A. DeVenezia's solution (THREAD: [SAS-L]
DEVICE=GIF Looks like PooPoo!) to generate gif graphs with sas in a
html page (code below).
problem is: the gif files are in the same directory as the html file,
but the graphs are not shown (not with netscape neither with IE), see
html source below. If I manually change the links from
<IMG SRC="F:\WORK_SAS\_TD960\gplot.gif" border="0">
to <IMG SRC="gplot.gif" border="0">
then the links are displayed. How can I tell SAS to do that for me,
and to write "short" links without the path?
--- Richard's code: --------------------------------------------------
Data xy;
do x = 1 to 10;
y = int (10*ranuni(0));
output;
end;
run;
ods html path="%sysfunc(pathname(WORK))" file="plot.html";
goptions reset=all;
goptions ftext='Arial Rounded MT Bold' htext=12pt;
goptions hsize=6in vsize=2in;
symbol1 i=join v=dot c=blue;
goptions targetdevice=gif;
proc gplot data=xy;
plot y*x;
title "Title 1";
label x = "X axis" y = "Y axis";
run;
quit;
goptions targetdevice=png;
proc gplot data=xy;
plot y*x;
title "Title 1";
label x = "X axis" y = "Y axis";
run;
quit;
ods html close;
---- HTML- Source ---------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<!-- Generated by SAS Software -->
<!-- Http://www.sas.com -->
<HEAD>
<TITLE>SAS Output</TITLE>
<META http-equiv="Content-type" content="text/html;
charset=windows-1252">
</HEAD>
<BODY onload="startup()" onunload="shutdown()" vlink="#004488"
link="#0066AA" leftmargin=8 rightmargin=8 bgcolor="#E0E0E0">
<SCRIPT LANGUAGE="JavaScript">
<!--
// This script is to load all object onLoad() functions
function startup(){ }
function shutdown(){ }
//-->
</SCRIPT>
<font face="Arial, Helvetica, Helv" size="3" color="#002288"><A
NAME="IDX"> </A>
<IMG SRC="F:\WORK_SAS\_TD960\gplot.gif" border="0">
<p style="page-break-after: always;"> </p><HR size=3><A
NAME="IDX1"> </A>
<IMG SRC="F:\WORK_SAS\_TD960\gplot1.png" border="0">
</font><SCRIPT LANGUAGE="JavaScript">
<!--
// This script is to load all object onLoad() functions
function startup(){
function shutdown(){Quote:}
//-->Quote:}
</SCRIPT>
</BODY>
</HTML>
--
-----------------------------------------------------------------
Dietrich Alte (Statistician, Dipl.-Stat.)
University of Greifswald - Medical Faculty
Institute of Epidemiology and Social Medicine
Walther-Rathenau-Str. 48, D-17487 Greifswald, Germany
Phone +49 (0) 3834 - 86 77 13, fax +49 (0) 3834 - 86 66 84
Institute http://www.medizin.uni-greifswald.de/epidem/
Study http://www.medizin.uni-greifswald.de/epidem/ship.htm
-----------------------------------------------------------------