I was trying to output my graph as a PNG file, but nothing came out under my directory. Following is my code:
filename grafout 'E:\test.png'; goptions reset=all gsfname=grafout gsfmode=replace device=png; proc sgplot data=plot; vbox value / category=time group=TreatName ; run; quit; filename grafout clear;
Anyone has any idea about output the graph? Thank you very much!
ODS GRAPHICS is not an ODS destination statement, like HTML or PDF. It does not have to be closed.
ODS GRAPHICS can be turned on and off (e.g. ods graphics off;); but the on/off does not affect the SG procedures. The on/off for controlling ODS Graphics output from SAS/STAT and other procedures that support that output.
As you said, the TICKSTYLE option was added after 9.4m2; however, it is definitely possible to annotate the tick marks on the inside. Here is a reference to a paper I wrote about annotation that should help you get started if you have not used annotation in this system.
Hope this helps!
Using this code , while running more than one time in a session it is creating with different file name. is there any way we can replace the existing file while running more than one time? I am running the below code; and result is attached. Please help.
filename grafout '/sasdata/picture.png';
ods listing gpath='/sasdata/';
ods graphics / imagename="picture" imagefmt=png;
PROC SGPLOT DATA = OVRDATA7;
SERIES X = EXTRACT_DT Y = Overcnt;
SERIES X = EXTRACT_DT Y = UBL3Sig;
SERIES X = EXTRACT_DT Y = LBL3Sig;
TITLE 'Override Graph';
Yes, just add a RESET or RESET=INDEX after the / on the ODS GRAPHICS statement. If you use RESET, make sure it is the *first* option after the slash. Otherwise, you might reset other option on your statement.
ods graphics / reset imagename="picture" imagefmt=png;
Hope this helps!
Registration is open! SAS is returning 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. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.