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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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