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

Hi all,

I want to add a footnote to a graph (using proc gplot) which is very long and SAS is not allowing it. If I break the sentence into 2 footnotes, is there a way to remove the line break between the two?. So, this would mean the second one starts where the first one ends on the same line.

Thanks.

VD

1 ACCEPTED SOLUTION

Accepted Solutions
GraphGuy
Meteorite | Level 14

I don't think there's a built-in graceful way to automatically split the long title or footnotes onto a 2nd line.  Typically (if you're using gtitles or gfootnotes) the font size of the titles & footnotes are reduced to allow the text to fit in 1 line.  I'm not sure what the limits are for the length of that 1 line.

One possible work-around for the splitting of the titles/footnotes is to use the 'move=' option in the title statement, to manually split the text into multiple lines.  This is a bit of a manual process, and will take some trial & error to get the 'move' numbers to look right.  There's some explanation on the following webpage (for example, in the box= section):

http://support.sas.com/documentation/cdl/en/graphref/65389/HTML/default/viewer.htm#n19y35ila5aaysn1q...

And here is a short example that demonstrates one way to use it:

footnote1 "Here is the first part of the long footnote"

   move=(-25,-1.5) "and here is the second part";

footnote2 height=5pct " ";

proc gslide;

run;

In my experience, if you are having to manually determine where to split the titles/footnotes, then it's easier to just go ahead and use multiple title/footnote statements (rather than using the move= option).  But if you really-really want it to be in 1 title statement, then move= is a way to do it.

View solution in original post

3 REPLIES 3
GraphGuy
Meteorite | Level 14

I don't think there's a built-in graceful way to automatically split the long title or footnotes onto a 2nd line.  Typically (if you're using gtitles or gfootnotes) the font size of the titles & footnotes are reduced to allow the text to fit in 1 line.  I'm not sure what the limits are for the length of that 1 line.

One possible work-around for the splitting of the titles/footnotes is to use the 'move=' option in the title statement, to manually split the text into multiple lines.  This is a bit of a manual process, and will take some trial & error to get the 'move' numbers to look right.  There's some explanation on the following webpage (for example, in the box= section):

http://support.sas.com/documentation/cdl/en/graphref/65389/HTML/default/viewer.htm#n19y35ila5aaysn1q...

And here is a short example that demonstrates one way to use it:

footnote1 "Here is the first part of the long footnote"

   move=(-25,-1.5) "and here is the second part";

footnote2 height=5pct " ";

proc gslide;

run;

In my experience, if you are having to manually determine where to split the titles/footnotes, then it's easier to just go ahead and use multiple title/footnote statements (rather than using the move= option).  But if you really-really want it to be in 1 title statement, then move= is a way to do it.

VD
Calcite | Level 5 VD
Calcite | Level 5

Robert/Cynthia,

Thank you for your replies. Much appreciated.

The move keyword seems to work for my graph, which is great.

Vikas

Cynthia_sas
SAS Super FREQ

Hi:

  Have you tried the NOGFOOTNOTE option in order to let ODS handle the long text string. I believe that is what you'll have to do. For example, if you compare the two outputs from the program below, you should see that the second program does not produce the desired results (no line break). I get a message in the log that says:

WARNING: FOOTNOTE1 is too long. Height has been reduced to 47.68 pct of specified or default size.

So, NOGFOOTNOTE tells SAS/GRAPH to let the destination take control of the footnote.

cynthia

%let jab1 = %str(Twas brillig and the slithy toves. );

%let jab2 = %str(Did gyre and gimble in the wabe. );

%let jab3 = %str(All mimsy were the borogroves. );

%let jab4 = %str(And the mome raths outgrabe. Beware the Jabberwock, my son!);

%let jab5 = %str(The jaws that bite, the claws that snatch!);

%let jab6 = %str(Beware the Jubjub bird and shun the frumious Bandernatch!);

ods listing close;

footnote "&jab1.&jab2.&jab3.&jab4.&jab5.&jab6";

ods html path='c:\temp' (url=none)

         file='footnote1.html' style=sasweb nogfootnote;

proc gplot data=sashelp.class;

  plot height*weight;

run;

quit;

ods html close;

  

footnote "&jab1.&jab2.&jab3.&jab4.&jab5.&jab6";

ods html path='c:\temp' (url=none)

         file='footnote2.html' style=sasweb gfootnote;

proc gplot data=sashelp.class;

  plot height*weight;

run;

quit;

ods html close;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 3 replies
  • 12400 views
  • 1 like
  • 3 in conversation