Created
November 15, 2016 20:16
-
-
Save gmbecker/4f09eb7c5d7289a3892c4d395d7c1701 to your computer and use it in GitHub Desktop.
legend title ggplot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## this worked for me | |
df = data.frame("omg" = factor(sample(1:2, 100, replace=TRUE)), x = rnorm(100), y = rnorm(100)) | |
ggplot(data=df) + aes(x = x, y = y, color = omg) + geom_point() + scale_colour_discrete(guide_legend(title="whaaat?\nok!")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment