[R] variation on vioplot?
Michael Dondrup
michael.dondrup at cebitec.uni-bielefeld.de
Thu Jun 1 20:27:43 CEST 2006
Hi Karin,
I think it's just setting horizontal to FALSE.
> vioplot(normal,uniform,horizontal=FALSE)
For the axis:
How about this:
> vioplot(normal, uniform)
> axis(2, pos=1.5)
sometimes the second axis might overlap, so try this one too:
> ylim <- range(normal, uniform)
> par(mfrow=c(1,2), bty='n')
> vioplot(normal, ylim=ylim,names=c('normal'))
> vioplot(uniform, ylim=ylim, names=c('uniform'))
btw: library(vioplot) works for me
Hope this helps
Michael
> Michael Dondrup <michael.dondrup at cebitec.uni-bielefeld.de> writes:
> > Hi Karin,
> > I would like to help with this, but it's not completely clear to me
> > what your vioplots look or should look like. Could you post a little
> > reproducible code example to the list, and then specify what should be
> > different?
>
> OK.
>
> Adapted from the vioplot example:
>
> source("vioplot.R")
> uniform<-runif(2000,-4,4)
> normal<-rnorm(2000,0,3)
> vioplot(normal,uniform,horizontal=TRUE)
>
> Now these two are positioned one on top of the other. I would like to
> have them next to each other, if possible. I would then like the scale
> underneath to be duplicated so that there is one scale underneath each
> of them.
>
> Karin
More information about the R-help
mailing list