BookmarkSubscribeRSS Feed
sstac
Calcite | Level 5

I am trying to include superscripts in individual panel labels using sgpanel. I have created the labels using proc format and the value statement, but I am having issues when I actually try to insert superscripts (of 1, 2, 3, etc).

 

After doing some research, it seems that it should be possible to insert superscripts into proc format value statements using (*ESC*) and the unicode value, but when I do this in SAS 9.4 it just prints everything out in the string. An example of the code I'm using is below. I've never called unicode values before so am not feeling confident about that either, but right now I just want it to not print the entire thing in a string.

 

I have additional labels but cut it down here to be concise. I then call the panel_var format in sgpanel.

 

proc format;

value panel_var 0='BSI(*ESC*){unicode "207A"x}(*ESC*){unicode "2071"x}'

1="Externalizing Problems";

run;

 

 

ods graphics on/ border=off width=11in height=8in;

ods rtf file="C:\filepath\filename.rtf" style=journal2;

proc sgpanel data=adj noautolegend;

panelby panel_var / columns=3 rows=4 uniscale=column novarname;

refline 0/axis=y;

scatter x=visit y=beta/yerrorupper=upper yerrorlower=lower;

format visit visit. panel_var panel_var.;

colaxis min=0.8 max=7.2 values=(1,2,3,4,5,6,7) valueshint;

rowaxis integer;

run;

ods rtf close;

3 REPLIES 3
DanH_sas
SAS Super FREQ

What version of SAS 9.4 are you running? This feature was released in SAS 9.4m3. Run this code and post the result fromn your log:

 

%put &sysvlong;

 

Thanks!

Dan

sstac
Calcite | Level 5

Thanks for your speedy reply. Log results: 9.04.01M2P072314

 

If I can't do it using this version, is there another way?

DanH_sas
SAS Super FREQ

It looks like your using SAS 9.4m2, which is why it did not work for you. As a possible alternative, take a look at Prashant Hebbar's paper (https://support.sas.com/resources/papers/proceedings13/371-2013.pdf). Starting on page 10, he talks about embedding unicode characters directly in your data set. You might be able to do this in a temporary data set to get the effect you want.

 

Hope this helps!

Dan

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 2514 views
  • 0 likes
  • 2 in conversation