BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jwestra84
Fluorite | Level 6

I am attempting to add ≥ in my XAXISTABLE in SGPLOT using the unicode value 2265 but haven't been able to get that to show up. I am using a format for the values. I have had success for adding ≥ in legends and inset boxes, but the XAXISTABLE is not working. The data in the SGPLOT procedure come from survival analysis.

 

ods escapechar="~";
proc format;
value grp 
	1 = "A + B"
	2 = "A + C"
	3 = "A + D"
	4 = "B + C"
	5 = "B + D"
	6 = "C + D"
	7 = "~{unicode '2265'x}3 Groups";
run;
proc lifetest data=analysis plots=s(atrisk=0 45 90 135 179);
time tt_event*event(0);
strata group;
ods output survivalplot=surv means=means;
run;
data surv2; set surv;
fail=(1-survival)*100;
run;
proc sgplot data=surv2 noautolegend;
format stratumnum grp.;
step x=time y=fail / group=stratumnum lineattrs=(thickness=1);
xaxis values=(0 45 90 135 180) label='Time to Event (Days)' labelattrs=(size=12) valueattrs=(size=12);
xaxistable atrisk / x=tatrisk class=stratumnum valueattrs=(size=12) labelattrs=(size=12) title="At Risk" titleattrs=(size=12);
yaxis label="Percent with Event" labelattrs=(size=12) valueattrs=(size=12);
run;

 

I am using SAS EG 7.15

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Try:

proc format;
value grp 
	1 = "A + B"
	2 = "A + C"
	3 = "A + D"
	4 = "B + C"
	5 = "B + D"
	6 = "C + D"
	7 = "(*ESC*){unicode '2265'x}3 Groups";
run;

Proc format doesn't use the ESCAPECHAR.

You may not see that value in a data set viewer depending on settings. Look at it in output though using a font that will display unicode.

View solution in original post

1 REPLY 1
ballardw
Super User

Try:

proc format;
value grp 
	1 = "A + B"
	2 = "A + C"
	3 = "A + D"
	4 = "B + C"
	5 = "B + D"
	6 = "C + D"
	7 = "(*ESC*){unicode '2265'x}3 Groups";
run;

Proc format doesn't use the ESCAPECHAR.

You may not see that value in a data set viewer depending on settings. Look at it in output though using a font that will display unicode.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 515 views
  • 2 likes
  • 2 in conversation