❝本节来介绍如何使用ggplot2来绘制森林图,下面通过一个小例子来进行展示
❞
加载R包
library(tidyverse)
导入数据
unicox csv("AKT3_mRNA_OS_pancan_unicox.csv...")
绘制森林图
p1 <- ggplot(unicox,aes(HR_log, cancer, col=Type))+
geom_point(aes(size=-log10(p.value))...legend.background=element_blank(), # 设置背景为空
legend.box.background=element_rect(colour="black"), # 图例绘制边框...=c(1,0),legend.justification=c(1,0))+
scale_color_manual(values = c("gray", "steelblue", "red"))
绘制基因名称