BookmarkSubscribeRSS Feed
Kastchei
Pyrite | Level 9
Hey all,

I have an odd problem, and I'll admit that I haven't done much troubleshooting as I'm under a fast approaching deadline (a half hour).

I cannot get the SG procs to use anything but PNG. When I submit the following code, the gplot produces a gif image, but the sgplot always produces a png. It doesn't matter if I select activex, java, bmp. No matter what I do, the sgplot always comes out as PNG.

Any ideas?

data x;
input x y z;
datalines;
1 1 3
1 2 5
1 3 8
1 4 7
1 5 8
1 6 7
2 1 6
2 2 7
2 3 7
2 4 7
2 5 8
2 6 7
;
run;

goptions device = gif;
ods html;
proc gplot data = x;
plot z*y=x;
run;
proc sgplot data = x;
xaxis type = discrete;
series x=y y=z / group = x;
run;
ods html close;
5 REPLIES 5
DanH_sas
SAS Super FREQ
Use this for the SG procedures:

ods graphics / imagefmt=;

THanks!
Dan
Kastchei
Pyrite | Level 9
Thanks a billion! It worked.
Dorota_Jarosz
Obsidian | Level 7
Dan: are you saying ods graphics options work ONLY for SG procedures?
Should we keep using goptions for regular proc gplot?
DanH_sas
SAS Super FREQ
The ODS GRAPHICS statement must be used for any template-based graphics output. This includes the SG procedures, GTL templates rendered using PROC SGRENDER, and any STAT/ETS/etc. procedures generating graphics with the "ODS GRAPHICS ON;" statement active. For regular SAS/GRAPH procedures, such as GPLOT and GCHART, continue to use GOPTIONS to control the global options.

Thanks!
Dan
Dorota_Jarosz
Obsidian | Level 7
Thanks, Dan. This is really helpful!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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