Data visualization with SAS programming

footnote - line break

Accepted Solution Solved
Reply
Frequent Contributor
Frequent Contributor
Posts: 94
Accepted Solution

footnote - line break

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


Accepted Solutions
Solution
‎10-23-2012 11:17 AM
SAS Employee
Posts: 963

Re: footnote - line break

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


All Replies
Solution
‎10-23-2012 11:17 AM
SAS Employee
Posts: 963

Re: footnote - line break

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.

Frequent Contributor
Frequent Contributor
Posts: 94

Re: footnote - line break

Robert/Cynthia,

Thank you for your replies. Much appreciated.

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

Vikas

SAS Super FREQ
Posts: 8,645

Re: footnote - line break

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;

Post a Question
Discussion Stats
  • 3 replies
  • 2641 views
  • 1 like
  • 3 in conversation