BookmarkSubscribeRSS Feed
GreggB
Pyrite | Level 9

the graphs in the Results Viewer have a nice color but my pdf file is black and white.

 

code:

ods pdf file="scores\Data files for researchers - SCDE\2021\plots of sdoc_sc_top10.pdf" ;
PROC sort data=dst10_math;
by demoid;
run;
/* YAXIS LABEL = 'Rain in Inches' GRID VALUES = (0 TO 10 BY 1); */
proc sgplot data=dst10_math;
by demoid;
styleattrs
datacontrastcolors=(red green blue);
vbar testgrade / response=mathpct34 group=level groupdisplay=cluster datalabel=mathpct34;
xaxis display=(nolabel noline noticks);
yaxis display=(nolabel) values=(0 to 80 by 10) ;
run;
ods pdf close;
3 REPLIES 3
Reeza
Super User

Style = mmh_basic_blue1 appears to be a custom style. Did you define the colours for graphs or which style does it inherit from?

 


@GreggB wrote:

the graphs in the Results Viewer have a nice color but my pdf file is black and white.

 

code:

ods pdf file="scores\Data files for researchers - SCDE\2021\plots of sdoc_sc_top10.pdf" style=mmh_basic_blue1;
PROC sort data=dst10_math;
by demoid;
run;
/* YAXIS LABEL = 'Rain in Inches' GRID VALUES = (0 TO 10 BY 1); */
proc sgplot data=dst10_math;
by demoid;
styleattrs
datacontrastcolors=(red green blue);
vbar testgrade / response=mathpct34 group=level groupdisplay=cluster datalabel=mathpct34;
xaxis display=(nolabel noline noticks);
yaxis display=(nolabel) values=(0 to 80 by 10) ;
run;
ods pdf close;

 

GreggB
Pyrite | Level 9

my apologies. It should not be there. When I delete it, nothing changes.

Reeza
Super User
Try using a style that has colour built in by default, ie Meadow, Seaside or HTMLBLUE which is the standard HTML blue output.

Check out the Style Gallery for starters:
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p14qidvs5xf7omn14ommvsuhvmzn.htm#n1dnn3...

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 3 replies
  • 1803 views
  • 0 likes
  • 2 in conversation