12-04-2016 03:18 AM - edited 12-04-2016 03:23 AM
A very simple question:
I need to get a histogram in black and white and in eps format
Here is the challenging part.
I am using proc univariate to get the histogram, if I turn ods graphics on to be able to control the image output format (eps), this will override the CFILL order, so the histogram comes out coloured not black and white:
%let gpath='C:\Users\User\Documents\My SAS Files\'; %let dpi=300; ods listing gpath=&gpath image_dpi=&dpi ; ods graphics / outputfmt=epsi imagename='Fig1'; proc univariate data=k5; format inr t.; histogram INR / cfill=black cbarline=white endpoints=(1 to 9 by 1) ; run;
If I turn on graphics, I can get the colours the way I want but I cant control the output format
Any solusion for this please?
Maybe using proc template? but I am not that good with GTL
12-04-2016 04:12 AM - edited 12-04-2016 04:19 AM
Change your style to JOURNAL.
ODS LISTING STYLE=Journal;
I don't think this will get you exactly what you want but should be closer. The Journal style is for publications and is black and white.
Theres also JOURNAL2.
See the examples linked here, a bit buried albeit.
12-04-2016 04:21 AM
It didnt work, i couldnt save the output as eps: I received the following error
WARNING: HTML4 destination does not support EPSI images. Using the default static format.
NOTE: The graph will be rendered as an image due to the use of transparency.
NOTE: PROCEDURE UNIVARIATE used (Total process time):
real time 0.51 seconds
cpu time 0.34 seconds
12-04-2016 04:30 AM
Your initial code doesn't mention ODS HTML only LISTING or show an error. In the future please include all relevant information. If something doesn't work, post the full code and log, since doesn't work is a vague term.
The docs do say that EPS is not supported for HTML. Either turn off HTML or use an SVG format instead.
ODS HTML CLOSE;