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!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 5 replies
  • 2056 views
  • 0 likes
  • 3 in conversation