BookmarkSubscribeRSS Feed
luvscandy27
Quartz | Level 8

I have reviewed all of the topics in this community and on the web and I am still unable to add superscript to my footnotes or titles. Any help

woild be greatly appreciated. Below please find my test code: 

 

data have;
infile datalines;
input year 4. pats_stage1_3 pats_total 3. ;
datalines;
1999 150 300
2000 112 369
2001 236 426
2002 121 400
2003 330 520
2004 280 500
;
run;

ods graphics on;
ods escapechar= '^';
ods excel file='/home/luvscandy270.xlsx'

options(sheet_name="test" embedded_titles="yes" embedded_footnotes="yes" TITLE_FOOTNOTE_NOBREAK="yes");
proc sgplot data=have noborder;

title 'TEST ^{super (b)}';

series x=year y=pats_stage1_3 / legendlabel="Male" lineattrs=(color=blue thickness=3) markers
markerattrs = (symbol = circlefilled color = blue size=10);
series x=year y=pats_total / legendlabel="Female" lineattrs=(color=green thickness=3) markers
markerattrs = (symbol = circlefilled color = green size=10);

xaxis label='Test' discreteorder=data fitpolicy=rotatethin valuesrotate=vertical ;
yaxis label = 'Test' values=(0 to 600 by 100) valueattrs=(family=arial size=10pt ) minor grid ;

reg x=year y=pats_stage1_3 / nomarkers lineattrs=(color=blue pattern=dash) legendlabel='Regr. stage 1-3';
reg x=year y=pats_total / nomarkers lineattrs=(color=green pattern=dash) legendlabel='Regr. total';

keylegend / location=inside position=top title="" valueattrs=(size=7pt family=arial) outerpad=(top=0.2cm) border;

footnote1 h=5pt justify=l 'Test ^{super (b)}';
footnote2 h=5pt justify=l 'Test 2';
run;

ods excel close;

  

2 REPLIES 2
PaigeMiller
Diamond | Level 26

It doesn't seem to work for me with PROC SGPLOT but it works for other PROCs.

 

ods escapechar="^";
title 'Example Alpha^{super 2}';
proc print data=sashelp.class(obs=4);
run;
proc sgplot data=sashelp.class;
    scatter x=height y=weight;
run;
--
Paige Miller
yabwon
Onyx | Level 15

you could with play with annotations:

data have;
infile datalines;
input year 4. pats_stage1_3 pats_total 3. ;
datalines;
1999 150 300
2000 112 369
2001 236 426
2002 121 400
2003 330 520
2004 280 500
;
run;

ods graphics on /  WIDTH=800px HEIGHT=800px;
ods escapechar= '^';
ods excel file='R:\luvscandy270.xlsx'

options(sheet_name="test" embedded_titles="yes" embedded_footnotes="yes" TITLE_FOOTNOTE_NOBREAK="yes");

title1 
  h=2 color=white "phantom" 
;

data anno; 
 function="text";
 length label $ 50 ANCHOR $ 10;
 label="TEST for title(*ESC*){sup '(b)'}";
 ANCHOR="TOP";
 X1SPACE="GRAPHPERCENT";
 X1=50;
 Y1SPACE="GRAPHPERCENT";
 Y1=96;
 TEXTWEIGHT='BOLD';
 TEXTSTYLEELEMENT="GraphTitleText";
 WIDTH=100;
 output; /* title */
 X1=5;
 Y1=5;
 TEXTSTYLEELEMENT="GraphFootnoteText";
 label="TEST for footnote (*ESC*){sup '(b)'}";
 ANCHOR="TOPLEFT";
 output; /* footnote */
run; 


proc sgplot data=have noborder sganno=anno;

series x=year y=pats_stage1_3 /  legendlabel="Male" lineattrs=(color=blue thickness=3) markers 
	   							 markerattrs = (symbol = circlefilled color = blue size=10);
series x=year y=pats_total / legendlabel="Female"  lineattrs=(color=green thickness=3) markers
							 markerattrs = (symbol = circlefilled color = green size=10);

xaxis label='Test' discreteorder=data fitpolicy=rotatethin valuesrotate=vertical ;
yaxis label = 'Test' values=(0 to 600 by 100) valueattrs=(family=arial size=10pt ) minor grid ;

reg x=year y=pats_stage1_3 / nomarkers lineattrs=(color=blue  pattern=dash) legendlabel='Regr. stage 1-3';
reg x=year y=pats_total    / nomarkers lineattrs=(color=green pattern=dash) legendlabel='Regr. total';

keylegend / location=inside position=top title="" valueattrs=(size=7pt family=arial) outerpad=(top=0.2cm) border;

run; 

footnote1  
  h=1 color=white "phantom" 
;


ods excel close; 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



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
  • 2 replies
  • 411 views
  • 0 likes
  • 3 in conversation