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

I can see how to use special characters in ENTRY statement but how do I do the same for the axis label coming from variable label or LABEL= option in LAYOUT OVERLAY.

ENTRY 'R' {sup '2'};

This works but I tried similar in LABEL, but the above syntax is not correct for LABEL.

1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

DN,  You'll have to lookup the character but, as long as their is a unicode equivalent for the sup script digits you want to include, the doc states:

And, there is a unicode superscript 2, see: http://www.fileformat.info/info/unicode/char/b2/index.htm

The {UNICODE}, {SUB}, and {SUP} text commands apply only to the ENTRY, ENTRYTITLE, and ENTRYFOOTNOTE statements. However, strings that are assigned to axis labels, curve labels, legend labels, and so on, can present Unicode characters using what is called "in-line formatting." To use this special formatting, you embed within the string an ODS escape sequence followed by a text command. Specifically, whenever you include (*ESC*) in a quoted string, it signals that the next token represents a text command. Currently, only the {UNICODE} text command is recognized, not {SUB} or {SUP}.

View solution in original post

2 REPLIES 2
art297
Opal | Level 21

DN,  You'll have to lookup the character but, as long as their is a unicode equivalent for the sup script digits you want to include, the doc states:

And, there is a unicode superscript 2, see: http://www.fileformat.info/info/unicode/char/b2/index.htm

The {UNICODE}, {SUB}, and {SUP} text commands apply only to the ENTRY, ENTRYTITLE, and ENTRYFOOTNOTE statements. However, strings that are assigned to axis labels, curve labels, legend labels, and so on, can present Unicode characters using what is called "in-line formatting." To use this special formatting, you embed within the string an ODS escape sequence followed by a text command. Specifically, whenever you include (*ESC*) in a quoted string, it signals that the next token represents a text command. Currently, only the {UNICODE} text command is recognized, not {SUB} or {SUP}.

data_null__
Jade | Level 19

Thanks Art I did not find that section in the online doc.

So using (*ESC*){unicode beta} works well in label  there are keywords for all the upper and lower case Greek letters.  I could not figure out how to inter Unicode strings like \u00b2 which I think represents something that in many fonts looks like a superscript 2.

I was successful entering the character directly using BYTE(178).  Or I could use 'b2'x but I embedded the character in a double quoted string using %SYSFUNC(BYTE(178),$1.).

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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