BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I'm just trying to get to grip with the ODS graphing options for use with say a GLM proc - but I am following the instructions on the net - but its still not plotting any graphs. My code is pasted below - any ideas where I'm going wrong?

Thanks

Dave

ods html style=statistical;
ODS HTML body = 'C:\Users\Dave\Documents\EvolutionWorkCopy\Reports\testStatgraph.xls';
ods graphics on;

proc glm data = Davetest.Amanda_data;
*where Species = 'Lat';
class sex population;
model svl = sex ;/*population sex*population*/
*means population sex sex*population /tukey;
*plot = meanplot(CLBAND);
run;
quit;
ods graphics off;
ods html close;
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
you might try using the explicit PATH and GPATH because otherwise, the image could get written to a different directory than the HTML file. The other possibility is to look in the SAS log to be sure that you have SAS/STAT and SAS/Graph licensed. Also, I'd recommend that you verify you can open the file in a browser first, before you try opening the file with Excel. ODS HTML creates an HTML file and while it is possible for Excel to open an HTML file, when you are debugging, I feel it is better to open files as originally coded, with the default viewer:
[pre]
ODS HTML path='C:\dir\subdir' (url=none)
Gpath= 'c:\dir\subdir' (url=none)
body = 'testStatgraph.html' style=statistical;
ods graphics on;
.... your GLM code;
ods graphics off;
ODS HTML CLOSE;
[/pre]

Also, some procedures have explicit options to turn on plots and graphics. You might try to run the GLM example for ODS Graphics (which usually has data with the sample program) and see whether that works.

cynthia

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 826 views
  • 0 likes
  • 2 in conversation