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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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