Closed
Description
Drawing a line with stat_function for x as factor used to work in ggplot2_1.0.0 and ggplot2_1.0.1. Doesn't work in ggplot2_2.0.0:
ggplot(iris,aes(x=factor(Species),Petal.Length)) + geom_violin() + stat_function(fun=function (x) as.numeric(x)^2, colour="red")
This works in ggplot2_2.0.0, but the x labels need fixing:
ggplot(iris,aes(x=as.numeric(Species),Petal.Length,group=as.numeric(Species))) + geom_violin() + stat_function(fun=function (x) as.numeric(x)^2, colour="red")
Metadata
Metadata
Assignees
Labels
No labels