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

innovate-wordmarks-white-horiz.png

SAS is headed back 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.

Interested in speaking? Content from our attendees is one of the reasons that makes SAS Innovate such a special event!

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.

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