BookmarkSubscribeRSS Feed
Fred_Gavin
Calcite | Level 5

Dear All,

I usually use SGPLOT to make statistical graphics, and currently the output graph is associated with png pic type.

Everytime the SGPLOT generates a graph, it also creates a file in the local folder.

Is there anyway  that I can view the graph in SAS without creating a file in my computer?

I chose the result preference that "viewing results using internal browser", but seems not work here.

It would be really appreciated that someone could instruct how to view graphs in SAS efficiently.

Thanks and Regards

4 REPLIES 4
DanH_sas
SAS Super FREQ

There are a few ODS output formats you can use that will embed the graph in the output file without having a separate image file. These include:

ods rtf file="whatever.rtf";

ods pdf file="whatever.pdf";

ods ps file="whatever.ps";

I would recommend trying RTF or PDF first, as they will diplay the best in your Display Manager session. Do note that you will still get a file on your disk ("whatever.rtf"), but that is the only file you see, regardless of the number of graphs or tables in your output.

Hope this helps,

Dan

NWV
Calcite | Level 5 NWV
Calcite | Level 5

Hi Dan,

I am using SGPLOT to make a simple line graph.  I'm using ODS to output it to a PDF.  And it is making the PDF, but also still insisting on making the .png file.

Is there a way to turn off the creation of the .png?  I'll be running a macro to make many graphs, and I do not want my workspace, or any space, littered with .png files.  I only need the pdfs.

Thank you,

Nicole

DanH_sas
SAS Super FREQ

Yes, just add:

ods listing close;

to the top of your program. That should do it for you.


Dan

NWV
Calcite | Level 5 NWV
Calcite | Level 5

Thank you, that worked.  I knew it had to be something simple--I just couldn't find a reference to it in the book, online help, or discussion community.  No more .pngs!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 891 views
  • 0 likes
  • 3 in conversation