Dear Baptiste,
Thanks a lot for the excellent example, which convinced me to start
studying ggplot2.
A trivial question: is there an easy way to generate a boxplot without
outliers?
Using R standard plotting facilities, this amounts to giving
outline=FALSE within boxplot.
Can I easily achieve t
Hi:
To make a more legible ordering of the plots, it might be a good idea to
make m$L1 an
ordered factor rather than a character variable:
m$L1 <- ordered(m$L1, levels = paste('dataset', 1:15, sep = ''))
# Lattice
bwplot(value ~ x | L1, data = m, as.table = TRUE)
# ggplot2
ggplot(m)+
geom_boxp
I forgot the base graphics way,
## divide the window in 4x4 cells
par(mfrow=n2mfrow(length(datasets)))
## loop over the list of datasets and plot each one
be.quiet <- lapply(datasets, function(ii) boxplot(y~x, data=ii))
ggplot2 has a website with many examples,
http://had.co.nz/ggplot2/
as well
Hi,
Here is some artificial data followed by minimal ggplot2 and lattice examples,
makeUpData <- function(){
data.frame(x=sample(letters[1:4], 100, repl=TRUE), y=rnorm(100))
}
datasets <- replicate(15, makeUpData(), simplify=FALSE)
names(datasets) <- paste("dataset", seq_along(datasets), sep
Dear All,
I am given 15 different data sets and I would like to generate a panel
showing all of them.
Each dataset will be presented either as a boxplot or as a histogram.
There are several possible ways to achieve this (as far as I know)
(1) using plot and mfrow()
(2) using lattice
(3) using ggp
5 matches
Mail list logo