I have made graphics using ODS and SGPLOT in SAS, my code looks like this:
ods rtf file="D:\" style=journal bodytitle nogfootnote;
goptions reset=all;
ods graphics / border=off width=18cm height=8cm ;
ods graphics / border=off width=17cm height=8.5cm;
footnote1 "Program: ";
PROC SGPLOT data=data noautolegend;
...
keylegend / title="Group:";
run;
ods rtf close;
I am using colors but the output .rtf file is black and white, How can I make it colored?
There's nothing in your code to indicate that the graph should have colours. If you specify the colours in PROC SGPLOT they are honoured and override the Style. The STYLE you've chosen is Journal, which is designed for print journals (eons ago) and do not include colour by design.
This shows the difference, where the first graph comes out with colours and the second does not and assumes the default style for Journal.
As another user pointed out, you can choose a different style and get automatic colours, but they're the template colours and not what you choose. There are various methods for specifying color within SGPLOT, the approach used here is a bit of overkill but its the documentation example so easy to use and copy/paste. This is a method typically used to ensure that items are coloured similar across multiple graphs even when possibly missing values, because SAS cycles the colours sequentially regardless of the groups/missing.