Skip to content

Instantly share code, notes, and snippets.

@aurielfournier
Last active April 13, 2016 18:35
Show Gist options
  • Save aurielfournier/9df31b330314c21edce278f62ace4985 to your computer and use it in GitHub Desktop.
Save aurielfournier/9df31b330314c21edce278f62ace4985 to your computer and use it in GitHub Desktop.
cool_science_stuff <- data.frame(a=runif(20, 2, 5), b=runif(20, 5, 10), c=rep("long name \nof a thing", 20))
library(ggplot2)
ggplot(data=cool_science_stuff)+
geom_boxplot(aes(x=c, y=a))
###
cool_science_stuff <- data.frame(a=runif(20, 2, 5), b=runif(20, 5, 10), c=rep("long name of a thing", 20))
library(ggplot2)
ggplot(data=cool_science_stuff)+
geom_boxplot(aes(x=c, y=a))+
scale_x_discrete(labels=c("long name of a thing"="long name \nof a thing"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment