Archive for May, 2014

Plotting in R using ggplot2

Change title of legend scale_fill_discrete(name = “Fishing method”) To hide y-axis scale par(mar=c(4, 4, 2, 0.5)) par(mar=c(2,2,2,2)) ggplot(mtcars,aes(x=factor(cyl),y=mpg))+ geom_point()+ theme(axis.text.x = element_text(colour=”grey20″,size=20,angle=90,hjust=.5,vjust=.5,face=”plain”), axis.text.y = element_text(colour=”grey20″,size=12,angle=0,hjust=1,vjust=0,face=”plain”), axis.title.x = element_text(colour=”grey20″,size=12,angle=0,hjust=.5,vjust=0,face=”plain”), axis.title.y = element_text(colour=”grey20″,size=12,angle=90,hjust=.5,vjust=.5,face=”plain”)) theme(axis.text.x=element_text(colour=”grey20″, size=10, face=”plain”))

Read More →