ha, I was focusing on the wrong thing!

Sorry, Gurmeet.  Good job!




>
>From: Xin Ge <xingemaill...@gmail.com>
>To: "Shi, Tao" <shida...@yahoo.com>
>Cc: Gurmeet <r.emailing.l...@gmail.com>; Jim Lemon <j...@bitwrit.com.au>; 
>r-help@r-project.org
>Sent: Fri, May 14, 2010 10:51:26 AM
>Subject: Re: [R] Multiple plots; single x(y) labels
>
>
>Thank you all for your replies. 
>
>
>@Tao: Actually Gurmeet's solution is the one I was looking for, below is a 
>chunk from my last email:
>
>
>*****************************
>Like for example, the following plot has a *combine* x-label ("Height") and 
>one y-label ("Weight")
>
>http://support.sas.com/documentation/cdl/en/grstateditug/61951/HTML/default/images/multi-panel-data.gif
>
>*****************************
>
>
>In the process I learnt so many other stuff,
>~Xin
>
>On Fri, May 14, 2010 at 1:29 PM, Shi, Tao <shida...@yahoo.com> wrote:
>
>Gurmeet,
>>
>>>>I think Xin is more interested in the common axes, rather than just one 
>>>>single xlab or ylab.
>>
>>>>Jim's solution is much more fancier than mine :-)
>>
>>>>...Tao
>>
>>
>>
>>
>>
>>>>----- Original Message ----
>>>>> From: Gurmeet <r.emailing.l...@gmail.com>
>>>>> To: Jim Lemon <j...@bitwrit.com.au>
>>>>> Cc: r-help@r-project.org
>>
>>> Sent: Fri, May 14, 2010 10:00:03 AM
>>>>> Subject: Re: [R] Multiple plots; single x(y) labels
>>>>>
>>
>>> Hi Xin,
>>
>>>>Or, just try adding "oma" and "mtext"
>>>>> commands:
>>
>>>>?par
>>>>?mtext
>>
>>>>#
>>>>> Code
>>>>par(mfcol=c(2,2))
>>>>par(oma=c(2,2,0,0))
>>>>plot(x <- sort(rnorm(7)),
>>>>> type = "s", main = "", ylab="", xlab="")
>>>>plot(x <- sort(rnorm(27)), type =
>>>>> "s", main = "", ylab="", xlab="")
>>>>plot(x <- sort(rnorm(47)), type = "s",
>>>>> main = "", ylab="", xlab="")
>>>>plot(x <- sort(rnorm(67)), type = "s", main =
>>>>> "", ylab="", xlab="")
>>>>mtext("One x-label", side = 1,
>>>>> outer=TRUE)
>>>>mtext("One y-label", side = 2,
>>>>> outer=TRUE)
>>
>>>>~Gurmeet
>>
>>
>>>>On Fri, May 14, 2010 at 4:14 AM, Jim
>>>>> Lemon <
>>
>>> href="mailto:j...@bitwrit.com.au";>j...@bitwrit.com.au> wrote:
>>
>>>>>
>>>>> On 05/14/2010 02:04 AM, Xin Ge wrote:
>>>>>
>>>>>> Hi
>>>>> All,
>>>>>>
>>>>>> Can anyone please help me with getting a single x
>>>>> and y-axis label while
>>>>>> plotting muliple plots. Here is the
>>>>> code:
>>>>>>
>>>>>> par(mfcol=c(2,2))
>>>>>> plot(x<-
>>>>> sort(rnorm(7)), type = "s", main = "", ylab="", xlab="")
>>>>>> plot(x<-
>>>>> sort(rnorm(27)), type = "s", main = "", ylab="", xlab="")
>>>>>>
>>>>> plot(x<- sort(rnorm(47)), type = "s", main = "", ylab="",
>>>>> xlab="")
>>>>>> plot(x<- sort(rnorm(67)), type = "s", main = "",
>>>>> ylab="", xlab="")
>>>>>>
>>>>>> also, how can remove x-tick lables
>>>>> using plot()?
>>>>>>
>>>>>>  Hi Xin,
>>>>> Fortunately, this
>>>>> wheel is pretty easy to reinvent:
>>>>>
>>>>>
>>>>> require(plotrix)
>>>>>
>>>>> x1<-rnorm(7)
>>>>>
>>>>> x2<-rnorm(27)
>>>>> x3<-rnorm(47)
>>>>> x4<-rnorm(67)
>>>>>
>>>>> allxlim<-c(1,67)
>>>>> allylim<-range(c(x1,x2,x3,x4))
>>>>>
>>>>> panes(matrix(1:4,nrow=2,byrow=TRUE),widths=c(1.1,1),
>>>>>
>>>>> heights=c(1,1.1))
>>>>> par(mar=c(0,4,2,0))
>>>>>
>>>>> plot(sort(x1),xlim=allxlim,ylim=allylim,type="s",
>>>>>
>>>>> main="",ylab="",xlab="",xaxt="n")
>>>>> tab.title("Plot of
>>>>> x1",tab.col="orange")
>>>>> par(mar=c(0,0,2,1))
>>>>>
>>>>> plot(sort(x2),xlim=allxlim,ylim=allylim,type="s",
>>>>>
>>>>> main="",ylab="",xlab="",xaxt="n",yaxt="n")
>>>>> tab.title("Plot of
>>>>> x2",tab.col="orange")
>>>>> par(mar=c(4,4,2,0))
>>>>>
>>>>> plot(sort(x3),xlim=allxlim,ylim=allylim,type="s",
>>>>>
>>>>> main="",ylab="",xlab="")
>>>>> tab.title("Plot of
>>>>> x3",tab.col="orange")
>>>>> par(mar=c(4,0,2,1))
>>>>>
>>>>> plot(sort(x4),xlim=allxlim,ylim=allylim,type="s",
>>>>>
>>>>> main="",ylab="",xlab="",yaxt="n")
>>>>> tab.title("Plot of
>>>>> x4",tab.col="orange")
>>>>>
>>>>> Jim
>>>>>
>>>>>
>>>>>
>>>>> ______________________________________________
>>>>>
>>> ymailto="mailto:R-help@r-project.org";
>>>>> href="mailto:R-help@r-project.org";>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.
>>>>>
>>
>>
   [[alternative HTML version
>>>>> deleted]]
>>
>>>>______________________________________________
>>
>>>>> ymailto="mailto:R-help@r-project.org";
>>>>> href="mailto:R-help@r-project.org";>R-help@r-project.org mailing list
>>
>>>>> href="https://stat.ethz.ch/mailman/listinfo/r-help"; target=_blank
>>
>>> >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.
>>
>


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

Reply via email to