Graphics Programming

Data visualization using SAS programming, including ODS Graphics and SAS/GRAPH. Charts, plots, maps, and more!
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.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1009 views
  • 2 likes
  • 2 in conversation