BookmarkSubscribeRSS Feed
VD
Calcite | Level 5 VD
Calcite | Level 5

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.

1 REPLY 1
Cynthia_sas
SAS Super FREQ

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


blue_pdf_style_printer.png

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 906 views
  • 0 likes
  • 2 in conversation