Thanks! I'd seen this sort of trick mentioned in places, but didn't twig
what it did. This is exactly what I was looking for.
James
On 19/4/11 7:04 AM, Greg Snow wrote:
tmp1<- par('usr')
--
James D Annan jdan...@jamstec.go.jp Tel: +81-45-778-5618 (Fax 5707)
Senior Scientist, Research Instit
r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of James Annan
> Sent: Tuesday, April 12, 2011 11:06 PM
> To: jim holtman
> Cc: r-help@r-project.org
> Subject: Re: [R] multiple lines on multiple plots
>
> Thanks for all the replies. Yes, I agree that calculati
Hi,
ggplot2 automatically adjusts its axes when new data are added to
plots; however you wouldn't get an automatic legend if you constructed
plots that way.
HTH,
baptiste
On 13 April 2011 17:06, James Annan wrote:
> Thanks for all the replies. Yes, I agree that calculating all the data first
>
Thanks for all the replies. Yes, I agree that calculating all the data
first is a simple solution which also has the benefit of making the axis
choice easier to get right, but on the downside it requires storing an
order of magnitude more output than my original sequential approach
would have d
="blue")
--- On Tue, 4/12/11, John Kane wrote:
> From: John Kane
> Subject: Re: [R] multiple lines on multiple plots
> To: r-help@r-project.org, "James Annan"
> Received: Tuesday, April 12, 2011, 11:54 AM
> Try this.
>
> ===
&
Instead of trying to go back to a previous plot, gather up all the
data for the plots and generate each one with the appropriate data.
This is much easier than trying to keep track of what the dimensions
are. Also if the data you want to add is outside the plot, then you
have issues with clipping;
Try this.
===
x<- 1:10
y<- (1:100)*3
par(mfcol=c(2,1))
plot(x, type="o")
plot(y)
===
--- On Tue, 4/12/11, James Annan wrote:
> From: James Annan
> Subject: [R] multiple lines on multiple plots
> To: r-help@r-project.org
>
I'm sure this must be trivial, but I'm a novice with R and can't work
out how to handle the axes when I am constructing multiple plots on a
page and try to return to a previous one to put multiple data sets it.
A simple example:
---
x<- 1:10
y<- (1:100)*3
par(mfcol=c(2,1))
plot(x)
plot(y)
par(
8 matches
Mail list logo