- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I wish to export the pie chart I created as pdf. I used the following code.
goptions reset=all border cback=white htitle=5pt gsfname=grafout gsfmode=replace device=pdf; filename grafout 'mypath\mydata.pdf'; legend1 label=none shape=bar(4,1.5) position=(top left) offset=(5,) across=4 mode=share; proc gchart data=mydata ; pie var1 / sumvar=var2 noheading coutline=black other=0 value= inside angle=30 ascending percent= arrow jstyle legend=legend1; run; quit;
When I run the above code, it says the data has been written to: \\AppData\Local\Temp\SAS Temporary Files\_TD5700_mm-b4_\gchart.png.
Any help?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anita_n,
My SAS 9.4 under Windows does produce the PDF file with your code, but this is because I use ODS Listing as the default destination and not HTML. I can reproduce the issue (only PNG is created and a warning " Unsupported device 'PDF' for HTML destination. ..." is written to the log) if I change the settings in Tools → Options → Preferences... → Results from "Create Listing" (only) to "Create HTML" (only).
So you can either tick the check box "Create listing" in the Preferences window and deselect "Create HTML" or submit
ods _all_ close;
ods listing;
to close the HTML and possibly other ODS destinations and open the Listing destination.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anita_n,
My SAS 9.4 under Windows does produce the PDF file with your code, but this is because I use ODS Listing as the default destination and not HTML. I can reproduce the issue (only PNG is created and a warning " Unsupported device 'PDF' for HTML destination. ..." is written to the log) if I change the settings in Tools → Options → Preferences... → Results from "Create Listing" (only) to "Create HTML" (only).
So you can either tick the check box "Create listing" in the Preferences window and deselect "Create HTML" or submit
ods _all_ close;
ods listing;
to close the HTML and possibly other ODS destinations and open the Listing destination.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Okay, thanks for that. I will try that