Hi,
I am trying to create graphical output and I am using the following legend statement to show Placebo, 50 µg, 100 µg, 250 µg :-
Legend1 value=(color=blue height=3 'Placebo' '50 µg' '100 µg' '250 µg');
But this statement is not creating the special symbol and just showing 'Placebo' '50 g' '100 g' '250 g'.
Can any one please help me with code to get special characters printed in the RTF output.
Thanks,
Mano.
What proc are you using, example code is useful.
How are you adding in the micro symbol in your text?
Hi,
Below is the code that I am using. I copied and pasted the text of treatment labels in my editor window of SAS. I am using SAS 9.1.3 version:-
****Graphics Options****;
goptions
device=png
targetdevice=png
xmax=23.4cm
ymax=13.5cm
ftext="arial"
htext=0.5
noborder
;
*--------------------------------------------------------------------------------------------*;
* Create symbol for each dose level
*--------------------------------------------------------------------------------------------*;
Legend1 value=(color=blue height=3 'Placebo' '50 µg' '100 µg' '250 µg');
symbol1 interpol=join h=1.5 line=1 value=dot color=black;
symbol2 interpol=join h=1.5 line=1 value=dot color=red;
symbol3 interpol=join h=1.5 line=1 value=dot color=green;
symbol4 interpol=join h=1.5 line=1 value=dot color=blue;
/* Specify AXIS statements */
/*Horizontal axis*/
axis1 label =(height=2.5 f='arial' "Study Visit" j=left)
order=(0 to 5 by 1)
value =(font = 'arial' h=2.5
tick=0 ""
tick=1 ""
tick=2 "baseline"
tick=3 "Month 3"
tick=4 "Month 6"
tick=5 "Month 12"
tick=6 ""
)
offset=(2,2) minor=none major=none;
/*Vertical axis*/
axis2 order=(&ymin to &ymax by &y_int) label = (height=2.5 f='arial' angle = 90 "Mean Change from Baseline in &cat")
value=(height=2.5 font = 'arial') minor =none;
run;
*--------------------------------------------------------------------------------------------*;
* ods formatting
*--------------------------------------------------------------------------------------------*;
goptions reset=goptions device=png
gunit = pct
rotate = landscape
xmax=22cm ymax=12.3cm
htext=10pt ;
ods rtf nogtitle nogfoot;
ods listing close;
ods rtf file="&pathlis.\figures\&outname..rtf" style=tfl headery=1700 footery=845 author="&sysuserid";
proc gplot data = _tr1;
plot yvar*visn=trtan/haxis= axis1 vaxis = axis2 legend=legend1 ;
run;
ods rtf close;
ods listing;
Check out this code, for me it seems to work with no problem, I use SAS9.4. I also added an example using SGPLOT
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.