Re: [R] How to set up the plot region

2014-03-04 Thread 张以春
Hi, Jim


Thank you very much for your suggestion. But, x11() seems to be invalid for my 
computer. I have tried to use mar() to resolve this question. Thanks a lot.


Best,
Yichun


 -原始邮件-
 发件人: Jim Lemon j...@bitwrit.com.au
 发送时间: 2014年3月4日 星期二
 收件人: 张以春 yczh...@nigpas.ac.cn
 抄送: r-help@r-project.org
 主题: Re: [R] How to set up the plot region
 
 On 03/04/2014 12:40 AM, 张以春 wrote:
  Dear friends,
 
 
  I have a question don't know how to do. I want to plot two graphs in one 
  column of one plot. Also, I want to make every graph to be a square with 
  width to be 8cm, and their gap is 2cm. How do I set up in par()? Thank you 
  very much.
 
 
  Yichun
 
 Hi Yichun,
 Your question is not entirely clear, but I'll try to make some 
 suggestions. If what you mean is the figure region (that's the plot 
 and the margins around it), you want something like this:
 
 x11(width=3.15,height=7.09)
 layout(matrix(c(1,3,2),ncol=1),heights=c(1,0.25,1))
 plot(1:5)
 plot(1:5)
 
 If you just want plots with nothing around them, maybe this:
 
 x11(width=3.15,height=7.09)
 layout(matrix(c(1,3,2),ncol=1),heights=c(1,0.25,1))
 par(mar=c(0,0,0,0))
 plot(1:5,axes=FALSE)
 box()
 plot(1:5,axes=FALSE)
 box()
 
 Jim



--
Dr Yichun Zhang
State Key Laboratory of Palaeobiology and Stratigraphy, Nanjing Institute of 
Geology and Palaeontology
39 East Beijing Road, Nanjing, China, 210008




[[alternative HTML version deleted]]

__
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] How to set up the plot region

2014-03-03 Thread 张以春
Dear friends,


I have a question don't know how to do. I want to plot two graphs in one column 
of one plot. Also, I want to make every graph to be a square with width to be 
8cm, and their gap is 2cm. How do I set up in par()? Thank you very much.


Yichun








[[alternative HTML version deleted]]

__
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] How to set up the plot region

2014-03-03 Thread Jim Lemon

On 03/04/2014 12:40 AM, 张以春 wrote:

Dear friends,


I have a question don't know how to do. I want to plot two graphs in one column 
of one plot. Also, I want to make every graph to be a square with width to be 
8cm, and their gap is 2cm. How do I set up in par()? Thank you very much.


Yichun


Hi Yichun,
Your question is not entirely clear, but I'll try to make some 
suggestions. If what you mean is the figure region (that's the plot 
and the margins around it), you want something like this:


x11(width=3.15,height=7.09)
layout(matrix(c(1,3,2),ncol=1),heights=c(1,0.25,1))
plot(1:5)
plot(1:5)

If you just want plots with nothing around them, maybe this:

x11(width=3.15,height=7.09)
layout(matrix(c(1,3,2),ncol=1),heights=c(1,0.25,1))
par(mar=c(0,0,0,0))
plot(1:5,axes=FALSE)
box()
plot(1:5,axes=FALSE)
box()

Jim

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