[R] How to draw y axis in horizontal bar plot?

R. Michael Weylandt michael.weylandt at gmail.com
Sat May 26 16:53:04 CEST 2012


I'm not sure there's a direct way to do it, but you could most likely use

abline(v = 0)

to add one to a plot. E.g.,

barplot(sample(-5:5), horiz = TRUE); abline(v = 0, lwd = 3, col = 2)

Michael

On Fri, May 25, 2012 at 10:55 PM, Manish Gupta
<mandecent.gupta at gmail.com> wrote:
> continued to previous mail ...................
>
> http://r.789695.n4.nabble.com/file/n4631429/Image1.png
> After plotting y axis it will look like
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/How-to-draw-y-axis-in-horizontal-bar-plot-tp4631428p4631429.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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