What you need to do is to specify that you don't want labels on the second plot:
## (2) Does plot points where (x-axis) they should be
xlim - range(x1)
plot(x1, y1, type=l, xlim=xlim)
par(new=TRUE)
plot(x2, y2, type=p, xlim=xlim, xlab='', ylab='', axes=FALSE)
axis(4)
On Wed, Oct 7, 2009 at 4:29
Hi
is there an alternative to par(new), for ading data to a plot for a
different y-axis?
My problem with par(new=TRUE) is, that it re-defines all axis and labels (as
in example 1) and one has to use xlim=... to fix the x-axis.
I am looking for something, which simply resets the y-axis, so that a
On Wed, Oct 7, 2009 at 11:28 AM, Petr PIKAL petr.pi...@precheza.cz wrote:
Hi
Try ?twoord.plot from plotrix package.
Thanks Petr - I was not aeware of this command.
But I would prefer a more general solution. An example on where I am using
is, to plot a histogram overlayed by its density
r-help-boun...@r-project.org napsal dne 07.10.2009 11:37:22:
On Wed, Oct 7, 2009 at 11:28 AM, Petr PIKAL petr.pi...@precheza.cz
wrote:
Hi
Try ?twoord.plot from plotrix package.
Thanks Petr - I was not aeware of this command.
But I would prefer a more general solution. An example
On Wed, Oct 7, 2009 at 11:53 AM, Petr PIKAL petr.pi...@precheza.cz wrote:
r-help-boun...@r-project.org napsal dne 07.10.2009 11:37:22:
On Wed, Oct 7, 2009 at 11:28 AM, Petr PIKAL petr.pi...@precheza.cz
wrote:
Hi
Try ?twoord.plot from plotrix package.
Thanks Petr - I was
Hi
Rainer M Krug r.m.k...@gmail.com napsal dne 07.10.2009 12:09:21:
On Wed, Oct 7, 2009 at 11:53 AM, Petr PIKAL petr.pi...@precheza.cz
wrote:
r-help-boun...@r-project.org napsal dne 07.10.2009 11:37:22:
On Wed, Oct 7, 2009 at 11:28 AM, Petr PIKAL petr.pi...@precheza.cz
wrote:
Hi
On Wed, Oct 7, 2009 at 12:26 PM, Petr PIKAL petr.pi...@precheza.cz wrote:
Hi
Rainer M Krug r.m.k...@gmail.com napsal dne 07.10.2009 12:09:21:
On Wed, Oct 7, 2009 at 11:53 AM, Petr PIKAL petr.pi...@precheza.cz
wrote:
r-help-boun...@r-project.org napsal dne 07.10.2009 11:37:22:
On
Hi
Rainer M Krug r.m.k...@gmail.com napsal dne 07.10.2009 12:40:39:
On Wed, Oct 7, 2009 at 12:26 PM, Petr PIKAL petr.pi...@precheza.cz
wrote:
Hi
Rainer M Krug r.m.k...@gmail.com napsal dne 07.10.2009 12:09:21:
snip
In the meantime, what about
x - rnorm(200)
hist(x, col =
On Wed, Oct 7, 2009 at 1:48 PM, Petr PIKAL petr.pi...@precheza.cz wrote:
Hi
Rainer M Krug r.m.k...@gmail.com napsal dne 07.10.2009 12:40:39:
On Wed, Oct 7, 2009 at 12:26 PM, Petr PIKAL petr.pi...@precheza.cz
wrote:
Hi
Rainer M Krug r.m.k...@gmail.com napsal dne 07.10.2009
Rainer M Krug-6 wrote:
Thanks - but if I want to have the histogram with counts (freq=TRUE), then
I have exactly the situation I was talking about - sorry for not being
clear:
x - rnorm(200)
hist(x, col = blue, freq = TRUE)
lines(density(x), col = red, lwd = 2)
i.e.
left y-axis
cls59 wrote:
# recovering par('xaxp') uses the original x limits.
plot.window( xlim = range( par('xaxp')[1:2] ), ylim = range( density(x)$y
))
Actually, I misspoke. I believe the following is the voodoo you want for
exactly recovering the original xlimit:
plot.window( xlim =
11 matches
Mail list logo