Partial Answer:
ggplot(data.frame(x=c(-0.25, 0.25)), aes(x=x)) + geom_path(aes(colour="red"), stat="function", fun=log1plusx)+ geom_path(aes(colour="blue"), stat="function", fun=self) + scale_colour_identity("Function", guide="legend", labels = c("log1plusx", "self"), breaks = c("red", "blue"))
Although, in my opinion, you better build a data.frame file before plotting.
baptiste
source share