04-17-2017 01:23 PM
is there a way where i can remove the background from white and make it transparent. I am using this options , but i want to make the background color to be transparent . is there any such options. Thanks
goptions reset=all border cback=white htitle=5.0 htext=4.0 imagestyle= vsize=5.17in hsize=7.10in;
goptions device=jpeg gsfname=out;
goptions xpixels=500 ypixels=500;
gunit=pct htitle=5.0 htext=4.0 ctext=gray33;
04-17-2017 03:31 PM
Not an exact solution, but a potential starting point is this post:https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/How-to-set-transparent-background-of-ods-c...
04-17-2017 05:16 PM
If you are using a traditional device based graphic procedure such as Gplot, Gchart, Gslide or Gmap I don't believe you can set transparency.
If this is for an annotate data set my may be able to determine the color you are displaying on and set to that color. Maybe. Not with any gradient and wouldn't work with any background color other than a solid fill pattern (no crosshatch or line pattern ),
If you share some example data and the full code we may be able to suggest something using the ODS graphic procedures that do support transparency.
04-17-2017 05:26 PM
Can you set your device to be PNG and use GOPTIONS TRANSPARENCY?
04-18-2017 08:09 AM
Dan is correct - I have verified it with the code below, and verified that the background looks 'checkerboard' in Photoshop, which indicates that it is transparent:
filename odsout '.';
ODS LISTING CLOSE;
ODS HTML path=odsout body="transparent.htm";
proc gchart data=sashelp.class;
hbar name / type=sum sumvar=height descending space=0
ODS HTML CLOSE;