HTML pages (from SAS/GRAPH to ODS) don't show graphs

HTML pages (from SAS/GRAPH to ODS) don't show graphs

Post by Dietrich Al » Wed, 10 Apr 2002 16:17:49



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">&nbsp;</A>
<IMG SRC="F:\WORK_SAS\_TD960\gplot.gif" border="0">
<p style="page-break-after: always;">&#160</p><HR size=3><A
NAME="IDX1">&nbsp;</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(){

Quote:}

function shutdown(){

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
-----------------------------------------------------------------

 
 
 

HTML pages (from SAS/GRAPH to ODS) don't show graphs

Post by Ulrike Gr?mpin » Wed, 10 Apr 2002 15:56:58


You have to include (URL=none) after the path specification in the ODS
HTML statement.

Regards, Ulrike


> 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">&nbsp;</A>
> <IMG SRC="F:\WORK_SAS\_TD960\gplot.gif" border="0">
> <p style="page-break-after: always;">&#160</p><HR size=3><A
> NAME="IDX1">&nbsp;</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(){

> }

> //-->

> </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
> -----------------------------------------------------------------


 
 
 

HTML pages (from SAS/GRAPH to ODS) don't show graphs

Post by Smith, Curtis, Mr, DC » Thu, 11 Apr 2002 00:26:05


You need to specify the gpath option to specify where the graphics image
is stored. Sample code as follows:

ods html file="c:\data\wuss 2001\overlay.html"
            (title="ODS Overlay Chart")
            gtitle gfootnote style=statdoc
                        gpath="c:\data\wuss 2001";

-----Original Message-----

Sent: Tuesday, April 09, 2002 12:18 AM

Subject: HTML pages (from SAS/GRAPH to ODS) don't show graphs

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">&nbsp;</A> <IMG SRC="F:\WORK_SAS\_TD960\gplot.gif"
border="0"> <p style="page-break-after: always;">&#160</p><HR size=3><A
NAME="IDX1">&nbsp;</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(){

}

//-->

</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
-----------------------------------------------------------------

 
 
 

1. SAS/Graph & ODS .. Higher Resolution Graphs??

System: SAS 8.2 on UNIX (Solaris)

I produce multiple reports that are served to the Web on a monthly basis to
an international community.  Many are produced using ODS writing to HTML
and/or RTF files.  Quality is acceptable, except when it comes to graphs.
Have in the past used the Postscript device, but favor embedding the graphs
either into the HTML or RTF files.  Unfortunately, I'm forced to use a bit
mapped device (i.e. GIF, PNG, TIF, JPEG, etc.).  The default size of the
graphs are acceptable.  However, the resolution leaves much to be desired
(fonts unreadable, lines and symbols aren't smooth).  Is there a way to keep
the size of the graph the same, but increase the number of dots per inch??
(I've determined that it's possible to increase the number of pixels .. but
that in turn increases the size of the graph .. thus creating a graph that's
unreadable/unprintable due to cropping).  This is a production environment
and I don't have the time to 'resize' multiple graphs each run.

Should note that the desire is for the users to be able to right click on
the graphs and be able to cut-n-paste them into applications such as Word
and PowerPoint (thus PostScript and PDF aren't ideal).  ActiveX and Java
were considered but they require that the users have access to the
respective SAS drivers.

Thoughts? Ideas?

***************************************
David Cuthbertson, M.S.
Biostatistician/Associate in Biostatistics
Moffitt Cancer Center at the
University of South Florida
12902 Magnolia Drive
Tampa, FL 33612
desk:  (813) 632-1326
fax:  (813) 632-1334

***************************************

######################################################################
This transmission may be confidential or protected from disclosure and
is only for review and use by the intended recipient. Access by
anyone else is unauthorized. Any unauthorized reader is hereby
notified that any review, use, dissemination, disclosure or copying of
this information, or any act or omission taken in reliance on it, is
prohibited and may be unlawful. If you received this transmission in
error, please notify the sender immediately.  Thank you.

######################################################################

2. Between Buildings

3. multiple graphs on one page - SAS graph

4. Hal whats-his-name radio show

5. SAS ODS HTML Graph output colors

6. FS: Sun SPARCclassic

7. SAS/GRAPH: Convert .gsf graph files to PDF or Postscript

8. synchronized mail servers

9. SAS/Graph: enabling portrait legal-size output in the graph output window

10. put SAS/GRAPH to ODS RTF

11. ods, proc report and sas/graph

12. Batch submit SAS graph (ods) ... (solved)

13. ODS RTF, graph and report on one page