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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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