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 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
  • 439 views
  • 2 likes
  • 2 in conversation