theme_grey()为默认主题,theme_bw()为白色背景主题,theme_classic()为经典主题。 代码语言:javascript 复制 p+theme_bw()+labs(subtitle="Change theme_bw") ggplot2 扩展包主题 代码语言:javascript 复制 library(ggthemes)p+theme_economist()+labs(subtitle="Change theme_economist")#其他可选#theme_economist...
theme_grey()为默认主题,theme_bw()为白色背景主题,theme_classic()为经典主题。 p + theme_bw() + labs(subtitle="Change theme_bw") ggplot2 扩展包主题 library(ggthemes) p + theme_economist() + labs(subtitle="Change theme_economist") #其他可选theme_economist theme_economist_whitetheme_wsj the...
aes(x=aa, y=bb), stat = "identity", position = "dodge")+theme_bw()+ ggtitle("默认")+theme(plot.title = element_text(hjust = 0.5, size = 25, color="red")) plot_2 <- ggplot()+geom_point(data = kk, aes(x=aa, y=bb), stat = "identity", position...
theme_bw()+ theme(legend.position = c(0.9,0.83))
1.1 theme_gray() 默认主题:灰色背景,白色网格线 1.2 theme_bw() 黑白主题:白色背景,灰色网格线 这两种主题都由参数base_size控制字体大小,eg: theme_bw(base_size = 20) 1.3 主题设置 全局性设置 theme_set(theme_bw()) #设置之后,下文的所有图都会启用这种主题 ...
我们可以使用ggplot 内建的theme。 代码语言:javascript 代码运行次数:0 复制 Cloud Studio代码运行 theme_gray()默认主题,灰色。theme_bw()非常适合显示透明度的映射内容。theme_void()去除非数据外的全部内容。theme_classic()# 经典ggplot 主题,白板背景。
theme_grey()为默认主题,theme_bw()为白色背景主题,theme_classic()为经典主题。 p+theme_bw()+labs(subtitle="Change theme_bw") ggplot2 扩展包主题 library(ggthemes)p+theme_economist() +labs(subtitle="Change theme_economist") #其他可选theme_economist theme_economist_whitetheme_wsj theme_exceltheme...
输入?theme可以看到theme()功能的大量参数,可以实现与外观相关的大多数要求。其中有四种主要类型: element_text():使用element_text()函数设置基于文本的组件,如title,subtitle 和caption等。 element_line():使用element_line()设置基于线的组件,如轴线,主网格线和次网格线等。
1、theme_gray() p1<-p+theme_gray()+ggtitle("theme_gray()")+theme(legend.position='none')p1 2、theme_bw() p2<-p+theme_bw()+ggtitle("theme_bw()")+theme(legend.position='none')p2 3、theme_classic() p3<-p+theme_classic()+ggtitle("theme_classic()")+theme(legend.position='none'...
(size = Count, color = -1 * log10(pvalue))) +scale_color_gradient(low = "green", high = "red") +labs(color = expression(-log[10](p_value)), size = "Count",x = "Enrichment Factor", y = "KEGG term", title = "KEGG enrichment") +theme_bw()ggsave("er.rt10_KEGG.png",...