[R] How do I insert a newline in my title in a plot?

2004-09-16 Thread Christos Rodopoulos
 Hello, I want to help me with a simple I think question: How do I insert a
newline into the title of a plot I have made? 

 Is it only done with hershey fonts? vfont = ??? and so on? I do not
understand Hershey fonts, and I am afraid to use them, since I use greek
fonts (iso8859-7).

 I need propably something like: title(This is a title\nIn 2 lines);

 any help?

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


FW: [R] How do I insert a newline in my title in a plot?

2004-09-16 Thread Christos Rodopoulos

yes I have tries, and nothing. It just shows the strings with the slashn,
just like i typed it.
-Original Message-
From: Rashid Nassar [mailto:[EMAIL PROTECTED]
Sent: , 16  2004 15:44
To: Christos Rodopoulos
Subject: Re: [R] How do I insert a newline in my title in a plot?


Have you not tried what you have already suggested:

   title(this is a title\nIn 2 lines)
?


On Thu, 16 Sep 2004, Christos Rodopoulos wrote:

  Hello, I want to help me with a simple I think question: How do I insert
a
 newline into the title of a plot I have made?

  Is it only done with hershey fonts? vfont = ??? and so on? I do not
 understand Hershey fonts, and I am afraid to use them, since I use greek
 fonts (iso8859-7).

  I need propably something like: title(This is a title\nIn 2 lines);

  any help?

 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html


__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] How do I insert a newline in my title in a plot?

2004-09-16 Thread Andy Bunn
You had it.

plot(1:5, main = This is a title\nIn 2 lines)

HTH, Andy

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] How do I insert a newline in my title in a plot?

2004-09-16 Thread John Fox
Dear Christos,

This works for me, and has many times in the past. Is it possible that you
used a forward-slash (/), rather than a back-slash (\)? Alternatively,
perhaps this has something to do with using Greek fonts.

I hope this helps,
 John

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Christos Rodopoulos
 Sent: Thursday, September 16, 2004 8:00 AM
 To: '[EMAIL PROTECTED]'
 Subject: FW: [R] How do I insert a newline in my title in a plot?
 
 
 yes I have tries, and nothing. It just shows the strings with 
 the slashn, just like i typed it.
 -Original Message-
 From: Rashid Nassar [mailto:[EMAIL PROTECTED]
 Sent: , 16  2004 15:44
 To: Christos Rodopoulos
 Subject: Re: [R] How do I insert a newline in my title in a plot?
 
 
 Have you not tried what you have already suggested:
 
title(this is a title\nIn 2 lines)
 ?
 
 
 On Thu, 16 Sep 2004, Christos Rodopoulos wrote:
 
   Hello, I want to help me with a simple I think question: How do I 
  insert
 a
  newline into the title of a plot I have made?
 
   Is it only done with hershey fonts? vfont = ??? and so on? 
 I do not 
  understand Hershey fonts, and I am afraid to use them, since I use 
  greek fonts (iso8859-7).
 
   I need propably something like: title(This is a title\nIn 
 2 lines);
 
   any help?
 
  __
  [EMAIL PROTECTED] mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html
 
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: FW: [R] How do I insert a newline in my title in a plot?

2004-09-16 Thread Prof Brian Ripley
On Thu, 16 Sep 2004, Christos Rodopoulos wrote:

 
 yes I have tries, and nothing. It just shows the strings with the slashn,
 just like i typed it.

Please consult the R posting guide and give us some basic information
such as version of R, platform, graphics device and so on.

 plot(1:10)
 title(this is a title\nIn 2 lines)

should work, and does for me on Windows and Linux.  I dimly remember it
did not on a Mac at one point.


 -Original Message-
 From: Rashid Nassar [mailto:[EMAIL PROTECTED]
 Sent: ÐÝìðôç, 16 Óåðôåìâñßïõ 2004 15:44
 To: Christos Rodopoulos
 Subject: Re: [R] How do I insert a newline in my title in a plot?
 
 
 Have you not tried what you have already suggested:
 
title(this is a title\nIn 2 lines)
 ?
 
 
 On Thu, 16 Sep 2004, Christos Rodopoulos wrote:
 
   Hello, I want to help me with a simple I think question: How do I insert
 a
  newline into the title of a plot I have made?
 
   Is it only done with hershey fonts? vfont = ??? and so on? I do not
  understand Hershey fonts, and I am afraid to use them, since I use greek
  fonts (iso8859-7).
 
   I need propably something like: title(This is a title\nIn 2 lines);
 
   any help?
 
  __
  [EMAIL PROTECTED] mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html
 
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 
 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


FW: FW: [R] How do I insert a newline in my title in a plot?

2004-09-16 Thread Christos Rodopoulos

platform: Linux Mandrake 10.0 AMD processor, X11 graphics with XFree latest,
R version 1.9.1 home-compiled.

 
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: ??, 16 ??? 2004 16:27
To: Christos Rodopoulos
Cc: '[EMAIL PROTECTED]'
Subject: Re: FW: [R] How do I insert a newline in my title in a plot?


On Thu, 16 Sep 2004, Christos Rodopoulos wrote:

 
 yes I have tries, and nothing. It just shows the strings with the slashn,
 just like i typed it.

Please consult the R posting guide and give us some basic information
such as version of R, platform, graphics device and so on.

 plot(1:10)
 title(this is a title\nIn 2 lines)

should work, and does for me on Windows and Linux.  I dimly remember it
did not on a Mac at one point.


 -Original Message-
 From: Rashid Nassar [mailto:[EMAIL PROTECTED]
 Sent: ÐÝìðôç, 16 Óåðôåìâñßïõ 2004 15:44
 To: Christos Rodopoulos
 Subject: Re: [R] How do I insert a newline in my title in a plot?
 
 
 Have you not tried what you have already suggested:
 
title(this is a title\nIn 2 lines)
 ?
 
 
 On Thu, 16 Sep 2004, Christos Rodopoulos wrote:
 
   Hello, I want to help me with a simple I think question: How do I
insert
 a
  newline into the title of a plot I have made?
 
   Is it only done with hershey fonts? vfont = ??? and so on? I do not
  understand Hershey fonts, and I am afraid to use them, since I use greek
  fonts (iso8859-7).
 
   I need propably something like: title(This is a title\nIn 2 lines);
 
   any help?
 
  __
  [EMAIL PROTECTED] mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html
 
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
 
 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


FW: [R] How do I insert a newline in my title in a plot?

2004-09-16 Thread Christos Rodopoulos

Thank you very much! I should have known...

 well, to inform you, this is the case:
 
  The problem was of a friend of mine, told to me me by phone.
  From the begining I was telling my friend BYPHONE  to do this:

title(This is a title\nIn 2 lines)

 but my friend understood and did all the time this:

title(This is a title/nIn 2 lines).

 but it is my problem too:
 the problem is that I say slash and I mean backslash, or vice cersa (!) So
the phone-confusion occured, and I 
was reporting a problem which does not exist!

thank you all for your help. Thanks from my friend too, and sorry for the
confusion I created.
-Original Message-
From: John Fox [mailto:[EMAIL PROTECTED]
Sent: , 16  2004 16:25
To: 'Christos Rodopoulos'
Cc: [EMAIL PROTECTED]
Subject: RE: [R] How do I insert a newline in my title in a plot?


Dear Christos,

This works for me, and has many times in the past. Is it possible that you
used a forward-slash (/), rather than a back-slash (\)? Alternatively,
perhaps this has something to do with using Greek fonts.

I hope this helps,
 John

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Christos Rodopoulos
 Sent: Thursday, September 16, 2004 8:00 AM
 To: '[EMAIL PROTECTED]'
 Subject: FW: [R] How do I insert a newline in my title in a plot?
 
 
 yes I have tries, and nothing. It just shows the strings with 
 the slashn, just like i typed it.
 -Original Message-
 From: Rashid Nassar [mailto:[EMAIL PROTECTED]
 Sent: , 16  2004 15:44
 To: Christos Rodopoulos
 Subject: Re: [R] How do I insert a newline in my title in a plot?
 
 
 Have you not tried what you have already suggested:
 
title(this is a title\nIn 2 lines)
 ?
 
 
 On Thu, 16 Sep 2004, Christos Rodopoulos wrote:
 
   Hello, I want to help me with a simple I think question: How do I 
  insert
 a
  newline into the title of a plot I have made?
 
   Is it only done with hershey fonts? vfont = ??? and so on? 
 I do not 
  understand Hershey fonts, and I am afraid to use them, since I use 
  greek fonts (iso8859-7).
 
   I need propably something like: title(This is a title\nIn 
 2 lines);
 
   any help?
 
  __
  [EMAIL PROTECTED] mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html
 
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: FW: [R] How do I insert a newline in my title in a plot?

2004-09-16 Thread Prof Brian Ripley
On Thu, 16 Sep 2004, Paul Lemmens wrote:

 Hoi Christos,
 
 --On donderdag 16 september 2004 16:00 +0300 Christos Rodopoulos 
 [EMAIL PROTECTED] wrote:
 
  yes I have tries, and nothing. It just shows the strings with the slashn,
  just like i typed it.
  -Original Message-
  From: Rashid Nassar [mailto:[EMAIL PROTECTED]
  Sent: ÐÝìðôç, 16 Óåðôåìâñßïõ 2004 15:44
  To: Christos Rodopoulos
  Subject: Re: [R] How do I insert a newline in my title in a plot?
 
 
  Have you not tried what you have already suggested:
 
 title(this is a title\nIn 2 lines)
  ?
 
 I've tried it out and you should use single quotes, then it'll work.

At least inside R single and double quotes are equivalent.

 So it's an interpretation matter. Unfortunately I cannot figure out the 
 help page dealing with this :-/

That's because it's in R-lang:

String constants are delimited by a pair of single (@samp{'}) or double
(@samp{}) quotes and can contain all other printable characters.
Quotes and other special characters within strings are specified using
@emph{escape sequences}:

A single quote may also be embedded directly in a double-quote delimited
string and vice versa.


It is possible that a front-end processor is interfering here, and so what 
is typed is not reaching R unchanged.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html