ggplot2: How to add linebreak to horizontal legend
问题 Please consider the following R script (taken and slightly modified from here): require(ggplot2) x <- 1:10 y <- jitter(x^2) DF <- data.frame(x, y) p <- ggplot(DF, aes(x = x, y = y)) + geom_point() + stat_smooth(method = 'lm', aes(colour = 'linear')) + stat_smooth(method = 'lm', formula = y ~ poly(x,2), aes(colour = 'polynomial')) + stat_smooth(method = 'nls', formula = y ~ a * log(x) +b, aes(colour = 'logarithmic')) + stat_smooth(method = 'nls', formula = y ~ a*exp(b *x), aes(colour =