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

Dears,

 

I'm using sgpanel procedure to get a graphs with subsript of one and zero.
Superscripts with zero and one works but no subscripts.

here is my code :

 

proc format;

      value $L2_  'S1' ="S(*ESC*){unicode '2070'x}(t)"

                        'S2' ="S(*ESC*){unicode '00b9'x}(t)"

                      'S3'="S(*ESC*){unicode '2079'x}(t)"

                      'S4'="S(*ESC*){unicode '2082'x}(t)"

                      'S5'="S(*ESC*){unicode '2081'x}(t)";

run;

 

ods graphics on / border=off width=22cm height=12cm; 

proc sgpanel data=x noautolegend;   

      format label2 $L2_.;

      panelby sample / novarname columns=2;

      scatter x=label2 y=col1 / group=method groupdisplay=cluster;

run;

 

This is the relevant part of the graph, where only superscript but not subscripts (unicode 2081 and 2081) works:

Graph1.jpg


If I use this format by a proc freq, than it works with subsript and superscript.

 

Do you have any idea what is the problem and how it can be solved?

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

When you reference Unicode values in the 2000 range, many fonts do not have those glyphs. That is why you're getting hte boxes. The way to address this is to reference a more complete Unicode font via the VALUEATTRS option on the axis statement. We ship some of these fonts. For your case, try the following statement. You might also need to use the SIZE option in the VALUEATTRS to make this font a little bigger.

 

rowaxis valueattrs=(family="Arial Unicode MS");

colaxis valueattrs=(family="Arial Unicode MS");

 

Hope this helps!
Dan

 

View solution in original post

2 REPLIES 2
DanH_sas
SAS Super FREQ

When you reference Unicode values in the 2000 range, many fonts do not have those glyphs. That is why you're getting hte boxes. The way to address this is to reference a more complete Unicode font via the VALUEATTRS option on the axis statement. We ship some of these fonts. For your case, try the following statement. You might also need to use the SIZE option in the VALUEATTRS to make this font a little bigger.

 

rowaxis valueattrs=(family="Arial Unicode MS");

colaxis valueattrs=(family="Arial Unicode MS");

 

Hope this helps!
Dan

 

MM08
Calcite | Level 5
Thanks, this is a simple and perfect solution.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 949 views
  • 2 likes
  • 2 in conversation