[R] Barplot legend position

From: Ingmar Visser <I.Visser_at_uva.nl>
Date: Fri 13 Oct 2006 - 11:29:26 GMT


Dear useRs,

I'm trying to create a barplot like so:

x=matrix(1:10,2,5)
barplot(x,leg=c("left","right"),besid=T)

The legend is placed in default position topright, however the data are plotted there too. I tried controlling the legend position by adding x="topleft" but this results in an error that x matches multiple formal arguments.

Leaving out the legend and making a separate call to legend leaves out the colors of bars ...

Please advice, Ingmar



R-help@stat.math.ethz.ch 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. Received on Sat Oct 14 13:05:13 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 14 Oct 2006 - 03:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.