2载入ggplot2包,制作柱形图 #载入包 library(ggplot2) #作图参数设置,data对应上面的数据集名字;aes对应x,y轴的数据标签,注意大小写,与数据集保持一致;geom_bar表示制作柱形图 p<-ggplot(data=df, aes(x=group, y=ORR)) + geom_bar(stat="identity") #展示图形 p 3对作图参数进行优化,横纵坐标置换、改...
dose: Dose in milligrams (0.5, 1, 2) Create barplots library(ggplot2) # Basic barplot p<-ggplot(data=df, aes(x=dose, y=len)) + geom_bar(stat="identity") p # Horizontal bar plot p + coord_flip() Change the width and the color of bars : ...
GGPlot2 Essentials for Great Data Visualization in Rby A. Kassambara (Datanovia) Network Analysis and Visualization in Rby A. Kassambara (Datanovia) Practical Statistics in R for Comparing Groups: Numerical Variablesby A. Kassambara (Datanovia) ...