filepath<-file.choose() ##file:需要导入的文本数据文件,后缀名可以是txt、dat、csv等。
filepath##得到文件名
df<-read.csv(filepath,header=T,stringsAsFactors = F)
##header=T,数据集第一行为变量名
head(df)##查看数据集前六行
library(dplyr)
library(ggplot2)
ggplot(df,aes(x=pvalue,y=Description))+ ##设置x轴和y轴
geom_point(aes(color=-log10(pvalue),
size=Count),alpha=1)+##点的大小和透明度
scale_colour_gradient(low="green",high="red")+
labs(x = "pvalue", y = "Description")+
theme(axis.title.y = element_text(size = 15, # 修改y轴主题题上字体大小,
color = "black", ## # 颜色
face = "bold"))+ ## # 加粗
theme(axis.text.y = element_text(size = 15, # 修改y轴标题题上字体大小,
color = "black", ## # 颜色
face = "bold"))+ ## # 加粗
theme(axis.title.x = element_text(size = 15, # 修改x轴主题题上字体大小,
color = "black", ## # 颜色
face = "bold"))+ ## # 加粗
theme(axis.text.x = element_text(size = 15, # 修改X轴标题上字体大小,
color = "black",## # 颜色
face = "bold"))+##加粗
theme(legend.text = element_text(size=15))+##右上角标题字体大小
theme(legend.title = element_text(size=15))+##右上角主题字体大小
guides(colour = guide_legend(override.aes = list(size=5))
)