Data visualization with SAS programming

GTL: Special Character(s) in axis LABEL

Accepted Solution Solved
Reply
Respected Advisor
Posts: 3,788
Accepted Solution

GTL: Special Character(s) in axis LABEL

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.


Accepted Solutions
Solution
‎11-11-2011 08:45 AM
PROC Star
Posts: 7,437

Re: GTL: Special Character(s) in axis LABEL

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


All Replies
Solution
‎11-11-2011 08:45 AM
PROC Star
Posts: 7,437

Re: GTL: Special Character(s) in axis LABEL

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}.

Respected Advisor
Posts: 3,788

Re: GTL: Special Character(s) in axis LABEL

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.).

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

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