Study Note for R ggplot学习100例
GGplot实操100练
GGplot实操100练
#Multiplot in ggplot2 install.packages("gridExtra") library("gridExtra") install.packages("cowplot") library("cowplot") df <- ToothGrowth # Convert the variable dose from a numeric to a factor variable df$dose <- as.factor(df$dose) head(df) #----Cowplot---- # The cowplot package is an extension to ggplot2 #and it can be used to provide a publication-ready plots. library(cowplot) # Default plot bp <- ggplot(df, aes(x=dose, y=len, color=dose)) [...]