Re: [R] Add text A, B, C and D on multiple ordered plot

2013-02-10 Thread John Kane
It all depends on where you want the text.  Did the other two replies that I 
have seen provide a better solution? 

If not can you give us some more description of what you want or point to a 
graph somewhere on the internet so we can get a better idea of what you want?

John Kane
Kingston ON Canada


 -Original Message-
 From: fabrice.c...@gmail.com
 Sent: Fri, 8 Feb 2013 15:39:24 -0500
 To: jrkrid...@inbox.com
 Subject: Re: [R] Add text A, B, C and D on multiple ordered plot
 
 John Kane,
 
 Thanks. It makes some of sense. But it seems not exactly what I want.
 I just remember it need using mtext and adjust margin. I saw such of
 example long time ago, but I have forgotten it.
 
 On Fri, Feb 8, 2013 at 3:32 PM, John Kane jrkrid...@inbox.com wrote:
 Here is a rough example of what you want. You will need to adjust the
 actual placement by hand by redefining the x  y values.
 
 set.seed(100)
   a - rnorm(1000,0,1)
   b -rnorm(1000,0,2)
   c -rnorm(1000,0,3)
   d -rnorm(1000,0,4)
opr  -  par(mfrow=c(2,2))
   hist(a)
   text(-3, 150, labels =a)
   hist(b)
   text(-4, 150, labels =b)
   hist(c)
   text(-4, 150, labels =c)
   hist(d)
   text(-4, 150, labels =d)
 
   par  -  opr
 
 
 John Kane
 Kingston ON Canada
 
 
 -Original Message-
 From: fabrice.c...@gmail.com
 Sent: Fri, 8 Feb 2013 14:42:10 -0500
 To: jrkrid...@inbox.com
 Subject: Re: [R] Add text A, B, C and D on multiple ordered plot
 
 Thank your reminder.
 Here is the example code:
 
 a- rnorm(1000,0,1)
 b-rnorm(1000,0,2)
 c-rnorm(1000,0,3)
 d-rnorm(1000,0,4)
 par(mfrow=c(2,2))
 hist(a)
 hist(b)
 hist(c)
 hist(d)
 
 I want to add A, B, C and D on each top left.
 
 On Fri, Feb 8, 2013 at 2:35 PM, John Kane jrkrid...@inbox.com wrote:
 Yes there probably is if you would show us what you are doing.
 Minimal working code helps.
 
 https://github.com/hadley/devtools/wiki/Reproducibility
 
 John Kane
 Kingston ON Canada
 
 
 -Original Message-
 From: fabrice.c...@gmail.com
 Sent: Fri, 8 Feb 2013 14:28:17 -0500
 To: r-help@r-project.org
 Subject: [R] Add text A, B, C and D on multiple ordered plot
 
 Dear list,
 
 Is there a elegant way to name multiple ordered plot as A, B, C and
 D?
 Just put A, B, C and D on the top left corner of each plot.
 
 Usually I do it in Illustrator, but I think in R should there is a
 way.
 
 Could you please provide a example?
 
 Thank you very much in advance.
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 
 FREE ONLINE PHOTOSHARING - Share your photos online with your friends
 and family!
 Visit http://www.inbox.com/photosharing to find out more!
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 
 FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
 Check it out at http://www.inbox.com/earth
 



FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Add text A, B, C and D on multiple ordered plot

2013-02-08 Thread Fabrice Tourre
Dear list,

Is there a elegant way to name multiple ordered plot as A, B, C and D?
Just put A, B, C and D on the top left corner of each plot.

Usually I do it in Illustrator, but I think in R should there is a way.

Could you please provide a example?

Thank you very much in advance.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Add text A, B, C and D on multiple ordered plot

2013-02-08 Thread John Kane
Yes there probably is if you would show us what you are doing.
Minimal working code helps.

https://github.com/hadley/devtools/wiki/Reproducibility

John Kane
Kingston ON Canada


 -Original Message-
 From: fabrice.c...@gmail.com
 Sent: Fri, 8 Feb 2013 14:28:17 -0500
 To: r-help@r-project.org
 Subject: [R] Add text A, B, C and D on multiple ordered plot
 
 Dear list,
 
 Is there a elegant way to name multiple ordered plot as A, B, C and D?
 Just put A, B, C and D on the top left corner of each plot.
 
 Usually I do it in Illustrator, but I think in R should there is a way.
 
 Could you please provide a example?
 
 Thank you very much in advance.
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
family!
Visit http://www.inbox.com/photosharing to find out more!

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Add text A, B, C and D on multiple ordered plot

2013-02-08 Thread Fabrice Tourre
Thank your reminder.
Here is the example code:

a- rnorm(1000,0,1)
b-rnorm(1000,0,2)
c-rnorm(1000,0,3)
d-rnorm(1000,0,4)
par(mfrow=c(2,2))
hist(a)
hist(b)
hist(c)
hist(d)

I want to add A, B, C and D on each top left.

On Fri, Feb 8, 2013 at 2:35 PM, John Kane jrkrid...@inbox.com wrote:
 Yes there probably is if you would show us what you are doing.
 Minimal working code helps.

 https://github.com/hadley/devtools/wiki/Reproducibility

 John Kane
 Kingston ON Canada


 -Original Message-
 From: fabrice.c...@gmail.com
 Sent: Fri, 8 Feb 2013 14:28:17 -0500
 To: r-help@r-project.org
 Subject: [R] Add text A, B, C and D on multiple ordered plot

 Dear list,

 Is there a elegant way to name multiple ordered plot as A, B, C and D?
 Just put A, B, C and D on the top left corner of each plot.

 Usually I do it in Illustrator, but I think in R should there is a way.

 Could you please provide a example?

 Thank you very much in advance.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

 
 FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
 family!
 Visit http://www.inbox.com/photosharing to find out more!

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Add text A, B, C and D on multiple ordered plot

2013-02-08 Thread John Kane
Here is a rough example of what you want. You will need to adjust the actual 
placement by hand by redefining the x  y values.

set.seed(100)
  a - rnorm(1000,0,1)
  b -rnorm(1000,0,2)
  c -rnorm(1000,0,3)
  d -rnorm(1000,0,4)
   opr  -  par(mfrow=c(2,2))
  hist(a)
  text(-3, 150, labels =a)
  hist(b)
  text(-4, 150, labels =b)
  hist(c)
  text(-4, 150, labels =c)
  hist(d)
  text(-4, 150, labels =d)
  
  par  -  opr


John Kane
Kingston ON Canada


 -Original Message-
 From: fabrice.c...@gmail.com
 Sent: Fri, 8 Feb 2013 14:42:10 -0500
 To: jrkrid...@inbox.com
 Subject: Re: [R] Add text A, B, C and D on multiple ordered plot
 
 Thank your reminder.
 Here is the example code:
 
 a- rnorm(1000,0,1)
 b-rnorm(1000,0,2)
 c-rnorm(1000,0,3)
 d-rnorm(1000,0,4)
 par(mfrow=c(2,2))
 hist(a)
 hist(b)
 hist(c)
 hist(d)
 
 I want to add A, B, C and D on each top left.
 
 On Fri, Feb 8, 2013 at 2:35 PM, John Kane jrkrid...@inbox.com wrote:
 Yes there probably is if you would show us what you are doing.
 Minimal working code helps.
 
 https://github.com/hadley/devtools/wiki/Reproducibility
 
 John Kane
 Kingston ON Canada
 
 
 -Original Message-
 From: fabrice.c...@gmail.com
 Sent: Fri, 8 Feb 2013 14:28:17 -0500
 To: r-help@r-project.org
 Subject: [R] Add text A, B, C and D on multiple ordered plot
 
 Dear list,
 
 Is there a elegant way to name multiple ordered plot as A, B, C and D?
 Just put A, B, C and D on the top left corner of each plot.
 
 Usually I do it in Illustrator, but I think in R should there is a way.
 
 Could you please provide a example?
 
 Thank you very much in advance.
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 
 FREE ONLINE PHOTOSHARING - Share your photos online with your friends
 and family!
 Visit http://www.inbox.com/photosharing to find out more!
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Add text A, B, C and D on multiple ordered plot

2013-02-08 Thread Rolf Turner


Try:

a- rnorm(1000,0,1)
b- rnorm(1000,0,2)
c- rnorm(1000,0,3)
d- rnorm(1000,0,4)
par(mfrow=c(2,2))
hist(a,main=)
title(main=A,adj=0)
hist(b,main=)
title(main=B,adj=0)
hist(c,main=)
title(main=C,adj=0)
hist(d,main=)
title(main=D,adj=0)

cheers,

Rolf Turner

On 02/09/2013 08:42 AM, Fabrice Tourre wrote:

Thank your reminder.
Here is the example code:

a- rnorm(1000,0,1)
b-rnorm(1000,0,2)
c-rnorm(1000,0,3)
d-rnorm(1000,0,4)
par(mfrow=c(2,2))
hist(a)
hist(b)
hist(c)
hist(d)
I want to add A, B, C and D on each top left.

On Fri, Feb 8, 2013 at 2:35 PM, John Kane jrkrid...@inbox.com wrote:

Yes there probably is if you would show us what you are doing.
Minimal working code helps.

https://github.com/hadley/devtools/wiki/Reproducibility

John Kane
Kingston ON Canada



-Original Message-
From: fabrice.c...@gmail.com
Sent: Fri, 8 Feb 2013 14:28:17 -0500
To: r-help@r-project.org
Subject: [R] Add text A, B, C and D on multiple ordered plot

Dear list,

Is there a elegant way to name multiple ordered plot as A, B, C and D?
Just put A, B, C and D on the top left corner of each plot.

Usually I do it in Illustrator, but I think in R should there is a way.

Could you please provide a example?

Thank you very much in advance.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Add text A, B, C and D on multiple ordered plot

2013-02-08 Thread Fabrice Tourre
John Kane,

Thanks. It makes some of sense. But it seems not exactly what I want.
I just remember it need using mtext and adjust margin. I saw such of
example long time ago, but I have forgotten it.

On Fri, Feb 8, 2013 at 3:32 PM, John Kane jrkrid...@inbox.com wrote:
 Here is a rough example of what you want. You will need to adjust the actual 
 placement by hand by redefining the x  y values.

 set.seed(100)
   a - rnorm(1000,0,1)
   b -rnorm(1000,0,2)
   c -rnorm(1000,0,3)
   d -rnorm(1000,0,4)
opr  -  par(mfrow=c(2,2))
   hist(a)
   text(-3, 150, labels =a)
   hist(b)
   text(-4, 150, labels =b)
   hist(c)
   text(-4, 150, labels =c)
   hist(d)
   text(-4, 150, labels =d)

   par  -  opr


 John Kane
 Kingston ON Canada


 -Original Message-
 From: fabrice.c...@gmail.com
 Sent: Fri, 8 Feb 2013 14:42:10 -0500
 To: jrkrid...@inbox.com
 Subject: Re: [R] Add text A, B, C and D on multiple ordered plot

 Thank your reminder.
 Here is the example code:

 a- rnorm(1000,0,1)
 b-rnorm(1000,0,2)
 c-rnorm(1000,0,3)
 d-rnorm(1000,0,4)
 par(mfrow=c(2,2))
 hist(a)
 hist(b)
 hist(c)
 hist(d)

 I want to add A, B, C and D on each top left.

 On Fri, Feb 8, 2013 at 2:35 PM, John Kane jrkrid...@inbox.com wrote:
 Yes there probably is if you would show us what you are doing.
 Minimal working code helps.

 https://github.com/hadley/devtools/wiki/Reproducibility

 John Kane
 Kingston ON Canada


 -Original Message-
 From: fabrice.c...@gmail.com
 Sent: Fri, 8 Feb 2013 14:28:17 -0500
 To: r-help@r-project.org
 Subject: [R] Add text A, B, C and D on multiple ordered plot

 Dear list,

 Is there a elegant way to name multiple ordered plot as A, B, C and D?
 Just put A, B, C and D on the top left corner of each plot.

 Usually I do it in Illustrator, but I think in R should there is a way.

 Could you please provide a example?

 Thank you very much in advance.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

 
 FREE ONLINE PHOTOSHARING - Share your photos online with your friends
 and family!
 Visit http://www.inbox.com/photosharing to find out more!

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

 
 FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
 Check it out at http://www.inbox.com/earth



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Add text A, B, C and D on multiple ordered plot

2013-02-08 Thread Bretschneider SIG-R
Dear Fabrice Tourre,


Re:



 John Kane,
 
 Thanks. It makes some of sense. But it seems not exactly what I want.
 I just remember it need using mtext and adjust margin. I saw such of
 example long time ago, but I have forgotten it.

(etc...)




Maybe this is what you're after?

Fiddled a bit with the margins:


a- rnorm(1000,0,1)
b-rnorm(1000,0,2)
c-rnorm(1000,0,3)
d-rnorm(1000,0,4)
quartz(w=6,h=8)
par(mfrow=c(2,2))
#par(mai=c(1,0,1,1))
par(mar=c(3,2,4,1))
#par(plt=c(1.1,1.1,1.1,1.1))
tlin=2
hist(a)
mtext(A,3, line=tlin, adj=0, cex=2)
hist(b)
mtext(B,3, line=tlin, adj=1, cex=2)
hist(c)
mtext(C,3, line=tlin, adj=0, cex=2)
hist(d)
mtext(D,3, line=tlin, adj=1, cex=2)


Hope this helps,
Best regards,


Franklin Bretschneider


--
Dept Biologie
Kruytgebouw W711
Padualaan 8
3584 CH Utrecht
The Netherlands

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.