【发布时间】:2019-10-24 17:47:16
【问题描述】:
我想删除水平网格线但保留垂直网格线。我还想在 x 和 y 轴上保持刻度。
这是我的代码,也是我目前尝试过的:
df <- data.frame("prop" = c(102.73,260.65), "Name" = c("All Genes","RG Genes"))
p<-ggplot(data=df, aes(x=Name, y=prop,fill=Name)) +
geom_bar(stat="identity")+
labs(x="", y = "Proportion of cis EQTLs")+
scale_fill_brewer(palette="Greens") +
theme_minimal()+
theme(legend.position = "none",panel.grid.minor.y = element_blank())
p + annotate("text", x = 1.5, y = 280, label = "p = XXXXXX", size = 3.5) +
annotate("rect", xmin = 1, xmax = 2, ymin = 270, ymax =270, alpha=1,colour = "black")
【问题讨论】: