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

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
Lapis Lazuli | Level 10

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
Lapis Lazuli | Level 10

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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1970 views
  • 3 likes
  • 3 in conversation