--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
Hi Brandon,
Using "group=" and "groups=" doesn't appear to make a difference. When the "linetype=" argument is not wrapped inside aes(), it results in an error:
Could you please send a version of that code that can easily be pasted
into R? I think this is a bug - or it maybe that the error message is
misleading, and this reflects an underlying limitation of the R
graphics model.
Thanks,
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
if (!solid_lines && !constant) {
stop("geom_path: If you are using dotted or dashed lines",
", colour, size and linetype must be constant over the line",
call.=FALSE)
}
in GeomPath$draw makes the error.
By removing this part, it looks like working well.
I don't know what this code actually doing.
x <- seq(0.01, .99, length=100)
df <- data.frame(x = rep(x, 2), y = c(qlogis(x), 2 * qlogis(x)),
group = rep(c("a","b"), each=100))
p <- ggplot(df, aes(x=x, y=y, group=group))
# Should work
p + geom_line(linetype = 2)
p + geom_line(aes(colour = group), linetype = 2)
p + geom_line(aes(colour = x))
# Should fail
should_stop(p + geom_line(aes(colour = x), linetype=2))
Hadley