-
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 calculating all the data
first is a simple solution which also has the benefit
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
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)
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 jdan...@jamstec.go.jp wrote:
From: James Annan jdan...@jamstec.go.jp
Subject: [R] multiple lines on multiple plots
To: r-help@r
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
, John Kane jrkrid...@yahoo.ca wrote:
From: John Kane jrkrid...@yahoo.ca
Subject: Re: [R] multiple lines on multiple plots
To: r-help@r-project.org, James Annan jdan...@jamstec.go.jp
Received: Tuesday, April 12, 2011, 11:54 AM
Try this.
===
x- 1:10
y- (1:100)*3
par
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
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 jdan...@jamstec.go.jp wrote:
Thanks for all the replies. Yes, I agree that calculating
8 matches
Mail list logo