1. 对坐标轴标题文字进行修改 plot()+xlab("横坐标标题") plot()+ylab("纵坐标标题") 2. 对坐标轴标题文字的大小进行修改 plot()+theme(axis.title.x = element_text(size=, color=, angle=, hjust=, vjust=)) plot()+theme(axis.title.y = element_text(size=, color=, angle=, hjust=, vjust...
p2 + theme(axis.title.x=element_text(vjust=1, size=20), # X axis title axis.title.y=element_text(size=10, color = "blue"), # Y axis title axis.text.x=element_text(size=10, angle = 45, color = "red", vjust=.5), # X axis text axis.text.y=element_text(size=10)) # Y...
axis.line = element_line(size = 1.2 , colour = 'black',linetype = 1), axis.text = element_text(size=10,colour="#003087",family="myFont"), legend.text = element_text(size=9,colour="#003087",family="myFont"), legend.key = element_blank() ) ggplot(mydata,aes(Company,Sale,fill...
p<-ggplot(mtcars,aes(mpg,hp,colour=factor(cyl)))+geom_point() p 1. 2. 2、调整x轴 p+theme(axis.title.x=element_text(vjust=2, size=20,face ="bold")) 1. p+theme(axis.text.x=element_text(vjust=1,size=20,face ="bold")) 1. 3、调整y轴 p+theme(axis.title.y=element_text(vj...
legend.title=element_blank(), #隐藏图例“pollutant" strip.text = element_text(face ="bold",size = 10), #设置单个图的类别标题文本的字体及大小(即小图中的“北京”、”天津“) axis.title =element_text(face = "bold"), #设置坐标标题文本 ...
同样,我们使用theme()函数并修改元素axis.title和/或从属元素axis.title.x和axis.title.y。例如,在element_text()中,我们可以覆盖size、color和face的默认值: ggplot(chic, aes(x = date, y = temp)) + geom_point(color = "firebrick") + labs(x = "Year", y = "Temperature (°F)") + ...
p1 + labs(x="x轴",y = "这是y轴",title = "生信补给站") p2 3.2 设置坐标大小,颜色 根据实际情况设置大小,颜色和倾斜角度可以更清晰的展示结果 p2 + theme(axis.title.x=element_text(vjust=1, size=20), # x axis title a...
plot.subtitle=element_text(size=15,# 字体大小 family="SimSun",# 字体类型 face="bold",# 字体加粗 hjust=0.5),# 标题离左边距距离 # caption 注释 plot.caption=element_text(size=15), # X axis title X轴标题 axis.title.x=element_text(vjust=0, ...
plot.title = element_text(color="red", size=14, face="bold.italic"), axis.title.x = element_text(color="blue", size=14, face="bold"), axis.title.y = element_text(color="#993333", size=14, face="bold") ) ggarrange(p,p1) ...
axis.text:改变坐标轴刻度值的字体大小; axis.title.x和axis.title.y改变x轴和y轴标题字体大小; binwidth表示的柱形的宽度; hjust = 0.5大标题居中; size=20表示大标题字体大小为20