Data visualization with SAS programming

Change of default colors in style

Reply
Frequent Contributor
Frequent Contributor
Posts: 94

Change of default colors in style

I want to use the style 'Printer' for a pdf destination. A graph using proc chart is giving me black and white output instead of any colors. Is it possible to get colors (in any given order) in this style?

Thanks.

SAS Super FREQ
Posts: 8,716

Re: Change of default colors in style

Hi:

  When I run this code using the STYLE=PRINTER

ods pdf file='c:\temp\teststyle.pdf' style=printer;

proc gchart data=sashelp.class;

  vbar age / discrete sumvar=height type=mean

      patternid=midpoint;

run;

quit;

ods pdf close;

I get several different colors (see screenshot)-- not black and white bars. So I wonder whether you have a PATTERN setting or an option that is interfering with the defined colors as set in the style.

It is totally possible to change the style and colors used for your graph, but it seems like you have a disconnect someplace if you are not seeing the default colors with the PRINTER style. I'd almost recommend working with Tech Support on this issue. There's no point in figuring how to change the colors if you're not seeing the default colors.

When you do get to the point that you want to change colors, with SAS/GRAPH, you can do it through the PATTERN statement and the PATTERNID= option and/or you can change the STYLE template, as described at the end of this paper (http://support.sas.com/resources/papers/proceedings10/033-2010.pdf).

cynthia

Attachment
Ask a Question
Discussion stats
  • 1 reply
  • 169 views
  • 0 likes
  • 2 in conversation