Thanks Jim! Thats just what I want.
Cheers
Rory
jim holtman wrote:
I forgot to make sure the axis ranges were the same:
x <- rnorm(1000)
x <- x + exp(-x/2)
layout(matrix(rep(c(1,1,2), 2), 2, 3, byrow=TRUE))
boxplot(x, ylim=c(0.5,4))
rug(jitter(x), side=2)
y <- density(x)
plot(y$y, y$x, type=
I forgot to make sure the axis ranges were the same:
x <- rnorm(1000)
x <- x + exp(-x/2)
layout(matrix(rep(c(1,1,2), 2), 2, 3, byrow=TRUE))
boxplot(x, ylim=c(0.5,4))
rug(jitter(x), side=2)
y <- density(x)
plot(y$y, y$x, type='l',ylim=c(0.5,4))
On Sun, Jun 8, 2008 at 7:07 AM, Rory Winston <[EMAIL
This gets you close to the solution that you want:
x <- rnorm(1000)
x <- x + exp(-x/2)
layout(matrix(rep(c(1,1,2), 2), 2, 3, byrow=TRUE))
boxplot(x)
rug(jitter(x), side=2)
y <- density(x)
plot(y$y, y$x, type='l')
On Sun, Jun 8, 2008 at 7:07 AM, Rory Winston <[EMAIL PROTECTED]> wrote:
> Hi
>
>
Hi
Consider the following graph:
x <- rnorm(1000)
x <- x + exp(-x/2)
layout(matrix(rep(c(1,1,2), 2), 2, 3, byrow=TRUE))
boxplot(x)
rug(jitter(x), side=2)
plot(density(x))
What I would really like to do is to have the density plot rotated by 90
degrees so that I can see it line up with the rug
4 matches
Mail list logo