[R] editing plot

Rui Barradas ru|pb@rr@d@@ @end|ng |rom @@po@pt
Wed Jan 8 21:58:07 CET 2020


Hello,

Maybe


theme(panel.grid.major.x = element_line(size = 0.1, color = "grey"),
         panel.grid.major.y = element_blank(),
         panel.grid.minor = element_blank()
   )



Note that if you remove the y axis grid you must set the x axis grid 
explicitly.

Hope this helps,

Rui Barradas

Às 18:52 de 08/01/20, Ana Marija escreveu:
> Hello,
> 
> I have this plot in attach. I was wondering how can I change my
> plotting code in order to remove these gray horizontal background
> lines but keep these two vertical lines? These two vertical lines
> don't need to be gray, can be any other type of lines but they must be
> at the same place. Also how can I make these two bars narrower?
> 
> library("ggplot2")
> p<-ggplot(data=toplot, aes(x=cat, y=props)) +
>    geom_bar(stat="identity", fill="steelblue")+
>    geom_errorbar(aes(ymin=props-1.96*ses, ymax=props+1.96*ses), width=.2,
>                  position=position_dodge(.9))  +
> 
>    geom_signif(comparisons=list( c("All eQTL", "eQTL from 103 genes"),
>                                 c("All SNPs", "eQTL from 103 genes")),
>                y_position=c(0.065, 0.07), tip_length=0, annotation=c("p
> = 0.0012", "p = 0.0023")) +
>    scale_y_continuous(breaks=seq(0,.06,by=.01)) +
>    xlab("") + ylab("Proportion p-values < 0.05") +
>    theme_minimal()
> p
> 
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list