BookmarkSubscribeRSS Feed
Ken_oy
Fluorite | Level 6
Hi everyone,

How can we export graph (from proc gplot) to a jpg format file (or bmp, or other)?
Any example?

Thanks!
5 REPLIES 5
Doc_Duke
Rhodochrosite | Level 12
Check the documentation for

OPTIONS DEV=JPEG;
Ken_oy
Fluorite | Level 6
Thanks, can you tell me how?

Any example code, please?

Thanks a lot.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Explore the SAS support http://support.sas.com/ website and ODS with SAS/Graph generated outputs.

Scott Barry
SBBWorks, Inc.
Cynthia_sas
SAS Super FREQ
Hi:
There are several different methods...depending on what kind of graphs you're creating (which procedure used):

A.) Device-based graphics (such as from PROC GCHART, GPLOT, etc)
--1) When you are looking at the graph in the GRAPH1 window, select
FILE --> Export As Image
or EDIT --> Edit Current Graph and then do a FILE --> Export from the Edit window;
--2) use ODS HTML with DEVICE=
--3) use FILENAME and GSFNAME and GSFMODE techniques with DEVICE=

B) Template-based graphics (such as from PROC SGPLOT, SGPANEL, etc or the use of ODS GRAPHICS ON/OFF with statistical procedures)
--1) Use the ODS GRAPHICS statement to control the IMAGEFMT= option however, these template-based graphics are already created as external files, so all you need to do is change the IMAGEFMT


Please note that these methods are all SEPARATE methods. That means if you're using ODS from A, you would -not- use method 1 or 3 and if you're using the Export method, you would -not- also use methods 2 or 3. Also you would not mix device-based methods (A) with template-based methods (B).

Searching Tech Support notes and the documentation should provide you plenty of examples and explanations.

cynthia
ChrisNZ
Tourmaline | Level 20
JPG is a bad format for "normal" graphs, where there are solid colors and sharp edges. PNG or even GIF would be better.

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
  • 3206 views
  • 0 likes
  • 5 in conversation