BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

Good monrning my friends:

I need help exporting images from SAS university edition.

Thanks you very much

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Try something like the following:

ods hmtl file='/folders/myfolders/myhtml.html' gpath='/folders/myfolders/';

proc sgplot data=sashelp.class;

scatter x=weight y=height;

run;quit;

If you navigate to myfolders destination you'll see the graphs generated as PNG files.

View solution in original post

5 REPLIES 5
Reeza
Super User

What kind of images? Graphs from SGPlot or SGScatter? What type of code are you running?

jonatan_velarde
Pyrite | Level 9

Both

If you could help me sending some example for each one, i will really appreciate.

Thank you

Reeza
Super User

Try something like the following:

ods hmtl file='/folders/myfolders/myhtml.html' gpath='/folders/myfolders/';

proc sgplot data=sashelp.class;

scatter x=weight y=height;

run;quit;

If you navigate to myfolders destination you'll see the graphs generated as PNG files.

jonatan_velarde
Pyrite | Level 9

Tested and Works Well

God Bless You!

Cynthia_sas
SAS Super FREQ

Hi:

  You do not need to put the full path in the FILE= option if you use PATH= and/or GPATH=. I tend to be overly cautious, so I use both. And rather than dump everything into /folders/myfolders, I like to keep the output contained within a separate folder (shown here as /all_output). So you don't accidentally close the automatic ODS HTML destination, a safer approach would be to identify your output file using the ID= suboption:

ods html(id=mystuff) path='/folders/myfolders/all_output' (url=none)

                     gpath='/folders/myfolders/all_output' (url=none)

                     file='main_wrapper.html';

    

*** code for SAS/GRAPH, if available, or SGPLOT if running UE;

ods graphics / imagename='class1';

proc sgplot data=sashelp.class;

scatter x=weight y=height;

run;

** SGPLOT does not need quit, but SAS/GRAPH does;

  

ods html(id=mystuff) close;

  If I have a chance to post an image, that shows the results, I will do it later.

output:

sas_UE_SGPLOT_image_output.png

cynthia

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!

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
  • 5 replies
  • 1563 views
  • 3 likes
  • 3 in conversation