- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 05-17-2023 03:04 PM
(1395 views)
What is the unicode to add a label with superscript 10 to the power 6?
- Tags:
- superscript
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The Unicode value for superscript 6 is 0x2076. However, you need to be sure you're using a "full-featured" Unicode font to show it, as most fonts do not contain that glyph. I would using "Arial Unicode MS" for san-serif text and "Times New Roman Uni" for serif text. Setting 10^6 on an axis label (for example) would look something like the following (on the correct axis statement):
label="10(*ESC*){unicode '2076'x}"
The INSET statement and annotation text supports using superscripts and subscript without using the Unicode values. You can use {sup '6'} in those cases.
Hope this helps!
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
/*用于加X轴Y轴标签的上下标*/
data _anno;
length label $ 200;
drawspace="layoutpercent"; function="text"; textweight="normal"; textsize=12;textcolor="black"; width=200;
x1=50; y1=2.5;label="XXXXX(*ESC*){sup '6'}"; output;
x1=2.5; y1=50;rotate=90;label="YYYY(*ESC*){sub '6'}"; output;
run;
/*****画散点图*****/
proc sgplot data=sashelp.class sganno=_anno noautolegend ;
scatter x=weight y=height/group=sex datalabel=name;
xaxis label=' ';
yaxis label=' ';
run;