Data visualization with SAS programming

How to use unicode in axis labels in Proc Template

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

How to use unicode in axis labels in Proc Template

Hi everyone,

 

I'm using SAS studio (the university edition) if it matters, but I think it has all the same features as the desktop version. I wrote code to create a figure using proc template. It has two panels (laid out horizontally, like two columns, one row), so I used layout lattice. To make an axis label that would apply to the x-axis of both panels, I used a bottom sidebar. For the units of my axis label, I have (mg/g), but I want it to be mg g-1. I can't figure out how to do this. I tried using the ods escapechar=^ and then within the entry statement using the escape character to specify the unicode. I also tried it with (*ESC*), e.g. (mg g(*ESC*){unicode '207b'x})

Instead of getting the symbols I want (i.e., a superscript minus sign and a superscript one), I just keep getting a little box on the figure where the symbol should be. Is it a font problem? Because other symbols work, like if I put in the unicode for 'alpha', I get a little alpha. I also tried using the code: ^{super -1} and nothing happened. I'm new to inserting special characters, so I bet there's something really simple that I'm missing. Any help appreciated!


Accepted Solutions
Solution
3 weeks ago
New Contributor
Posts: 2

Re: How to use unicode in axis labels in Proc Template

Never mind! Adding the font family made it work!

    entry "Green leaf concentration (mg g(*ESC*){unicode '207b'x}(*ESC*){unicode '00b9'x})" / textattrs=(family='graphunicodetext' weight=bold size=15) ;

View solution in original post


All Replies
Solution
3 weeks ago
New Contributor
Posts: 2

Re: How to use unicode in axis labels in Proc Template

Never mind! Adding the font family made it work!

    entry "Green leaf concentration (mg g(*ESC*){unicode '207b'x}(*ESC*){unicode '00b9'x})" / textattrs=(family='graphunicodetext' weight=bold size=15) ;

☑ This topic is solved.

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

Discussion stats
  • 1 reply
  • 91 views
  • 0 likes
  • 1 in conversation