-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Milestone
Description
Thank you for all the good work.
This comes from a discussion on google group:
https://groups.google.com/forum/?fromgroups=#!search/With$20stat=%22summary%22,$20fun.y=%22mean%22$20get$20%22Each$20group$20consist$20of$20only$20one$20observation%22/ggplot2/ECI59jsdOYc/CCm1MOxXnhEJ
Examples:
d <- qplot(cyl, mpg, data=mtcars)
d + geom_line(stat="summary", fun.y="mean")
or
stat_sum_single <- function(fun, geom="point", ...) {
stat_summary(fun.y=fun, colour="red", geom=geom, size = 3, ...)
}
d + stat_sum_single(mean, geom="line", aes(group=as.character(cyl)))
or
ggplot(mtcars, aes(x=cyl, y=mpg)) +
geom_point() +
stat_summary(fun.y=mean, geom="line", aes(group=factor(cyl)))
or
...
all give
"geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?"
with no path traced on plot
Metadata
Metadata
Assignees
Labels
No labels