BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
whk2023
Fluorite | Level 6

Hello,

 

I am doing a homework which requires me to generate plots and tables in .html.

Below is my code, but the plot cannot be generated properly in webpage.

ods html path='path/Module07' (url=none) file='Q5_2.html' style= htmlblue;

ods graphics;

ODS PROCLABEL"Histogram plot";
title "Distribution of statistics knowledge";
proc sgplot data = homework.module00;
vbar status / response= Statistics_Knowledge;
run;
ods graphics off;

ods html close;

There is no error or warning in LOG. However the webpage shows as below:

whk2023_0-1697114941481.png

Does anyone know what the problem could be?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
Use HTML5 instead of HTML.

HTML doesn't embed images it links to it, so the images need to be somewhere as well.
HTML5 embeds images in the files so you don't need to consider where the image files are stored.

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

Show us the ENTIRE log for this code anyway. Please copy the log as text and paste it into the window that appears when you click on the </> icon.

PaigeMiller_0-1663012019648.png

--
Paige Miller
Cynthia_sas
SAS Super FREQ
Hi:
I suspect you may also need a GPATH= option to direct ODS where the image will be stored. But a lot depends on your PATH= option too. You are using a relative path reference in the PATH= option.
I would normally expect to see a fully qualified path location in the path= option something like:
ods html gpath='c:\temp' (url=none)
path='c:\temp' (url=none)
file='myhistogram.html';
The way you have it coded now, the path will be relative to your working directory unless you have edited the actual code to remove the fully qualified path. Hard to tell.
Cynthia
Reeza
Super User
Use HTML5 instead of HTML.

HTML doesn't embed images it links to it, so the images need to be somewhere as well.
HTML5 embeds images in the files so you don't need to consider where the image files are stored.
Cynthia_sas
SAS Super FREQ
Thanks @Reeza. I always forget to mention HTML5 and SVG as a possibility.
Cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1066 views
  • 6 likes
  • 4 in conversation