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

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?

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

View solution in original post

8 REPLIES 8
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Should be available on all systems.  Maybe present some code on how you attempted to do this might help?  

 

ChristosK
Quartz | Level 8
   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;
ChristosK
Quartz | Level 8

I tried justify =left and j=left in the footnote but nothing happened.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

ChristosK
Quartz | Level 8

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.....

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

ChristosK
Quartz | Level 8
   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.
the font seems to be working, thanks again.
 
I'm just getting this one warning message at the end though...  

 

ballardw
Super User

@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;

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!
SAS Enterprise Guide vs. SAS Studio

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.

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
  • 8 replies
  • 4004 views
  • 3 likes
  • 3 in conversation