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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2414 views
  • 0 likes
  • 2 in conversation