I tried justifying a footnote in a proc sgplot figure but it stays in the center.
Is this one of the features that is not available in SAS Studio?
There isn't any alignment given in that code. This code works fine though:
proc sgplot data=sashelp.class; title j=l "Hello"; scatter x=age y=sex; footnote j=r "World"; run;
Note the j=.
Oh, and the last footnote has the quote right next to the word footnote2.
Should be available on all systems. Maybe present some code on how you attempted to do this might help?
proc sgplot data=Concordance_DIA_lab nowall noborder ;
title 'Concordance coefficients for DBP compared to Arterial Line pressures by time';
styleattrs datacontrastcolors=(CX016381 CX1BC9FF CXFF7F00 CX814101 ) ;
scatter x=DV y=CC / group=Measure yerrorlower=LCL yerrorupper=UCL noerrorcaps markerattrs=(symbol=circlefilled size =5)
groupdisplay=cluster clusterwidth =0.5;
scatter x=dv y=cc / group=measure markerattrs=(size=0pt) name='scatter';
keylegend 'scatter' / position=bottom location=inside position=bottomright autoitemsize title='Measures' noborder;
yaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal) ;
xaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal);
refline 0.75 / axis=y discretethickness=1 lineattrs=(color=cxd0e0f0) LABEL = ('0.75');
xaxistable N /class =Measure location=outside;
footnote 'x-axis table lists count for each measure' ;
footnote2'refline is of concordance coefficient for 0.75';
run;
I tried justify =left and j=left in the footnote but nothing happened.
There isn't any alignment given in that code. This code works fine though:
proc sgplot data=sashelp.class; title j=l "Hello"; scatter x=age y=sex; footnote j=r "World"; run;
Note the j=.
Oh, and the last footnote has the quote right next to the word footnote2.
That worked.
What I had been doing is writing the justify statement after the text in inverted commas.
Thank you very much!
The only warning sign I still get relates to the font:
I guess only Albany AMT is available in SAS Studio.....
Again, I can't see your code. You can check out:
http://support.sas.com/kb/24/853.html
So something like:
title j=c font="Arial" "Hello World";
Should work fine. You will have a lot of fonts installed, you just need to correctly spell and present them.
proc sgplot data=Concordance_DIA_lab nowall noborder ;
title 'Concordance coefficients for DBP compared to Arterial Line pressures by time';
styleattrs datacontrastcolors=(CX016381 CX1BC9FF CXFF7F00 CX814101 ) ;
scatter x=DV y=CC / group=Measure yerrorlower=LCL yerrorupper=UCL noerrorcaps markerattrs=(symbol=circlefilled size =5)
groupdisplay=cluster clusterwidth =0.5;
scatter x=dv y=cc / group=measure markerattrs=(size=0pt) name='scatter';
footnote j=l'x-axis table lists count for each measure' ;
footnote2 j=l font="Times" italic 'refline is of concordance coefficient for 0.75' ;
run;
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 proc sgplot data=Concordance_DIA_lab nowall noborder ;
74
75 title 'Concordance coefficients for DBP compared to Arterial Line pressures by time';
76 styleattrs datacontrastcolors=(CX016381 CX1BC9FF CXFF7F00 CX814101 ) ;
77 scatter x=DV y=CC / group=Measure yerrorlower=LCL yerrorupper=UCL noerrorcaps markerattrs=(symbol=circlefilled size
77 ! =5)
78 groupdisplay=cluster clusterwidth =0.5;
79 scatter x=dv y=cc / group=measure markerattrs=(size=0pt) name='scatter';
80
81 keylegend 'scatter' / position=bottom location=inside position=bottomright autoitemsize title='Measures' noborder;
82
83 yaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal) ;
84 xaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal);
85 refline 0.75 / axis=y discretethickness=1 lineattrs=(color=cxd0e0f0) LABEL = ('0.75');
86 xaxistable N /class =Measure location=outside;
87 footnote j=l'x-axis table lists count for each measure' ;
88 footnote2 j=l font="Times" italic 'refline is of concordance coefficient for 0.75' ;
89 run;
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.74 seconds
cpu time 0.32 seconds
WARNING: The font <sans-serif> is not available. Albany AMT will be used.
WARNING: Unable to use the Albany AMT font. The font might not be registered or more memory is needed.
WARNING: The font <sans-serif> is not available. Albany AMT will be used.
WARNING: Unable to use the Albany AMT font. The font might not be registered or more memory is needed.
NOTE: There were 24 observations read from the data set USER.CONCORDANCE_DIA_LAB.
@ChristosK wrote:
That worked.
What I had been doing is writing the justify statement after the text in inverted commas.
Thank you very much!
The only warning sign I still get relates to the font:
WARNING: The font <sans-serif> is not available. Albany AMT will be used.WARNING: The font <sans-serif> is not available. Albany AMT will be used.
I guess only Albany AMT is available in SAS Studio.....
General approach with SAS would be to have all of the text modifiers before the text. Note that you can have text justified left and right on the same title/footnote:
footnote j=l '* Note 1' j=r '** Note 2'; proc print data= sashelp.class (obs=5) noobs; run; footnote;
and center if all your text fits on one line, unexpected results if the length of all the text exceeds the current line length.
If do something such as set font size, color or weight before the first bit of text that would carry over to the second text unless explicitly modified before the second bit. In fact you could change things in the middle of one section of text:
footnote j=l '* Note ' color=red '1' j=r color=blue '** Note 2'; proc print data= sashelp.class (obs=5) noobs; run; footnote;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: