From bolker@zoo.ufl.edu  Mon Mar 20 22:34:49 2000
From: bolker@zoo.ufl.edu (bolker@zoo.ufl.edu)
Date: Mon, 20 Mar 2000 23:34:49 +0100 (MET)
Subject: [Rd] minor problem in barplot legend (PR#494)
Message-ID: <200003202234.XAA19634@pubhealth.ku.dk>


  If length(col)<length(legend.txt) in barplot, then the reversal of
the legend leads to funny results.  For example:

x <- matrix(runif(25),nrow=5)
barplot(x,col=c("red","green","black"),legend=as.character(1:5),ylim=c(0,5))

The (easy) fix is to replace

       legend.col <- col

with

         legend.col <- rep(col,length=length(legend.text))

on line 94 of barplot.default.

  Trivia, but hey, it confused me for a little while, it might as well
be fixed.

--please do not edit the information below--

Version:
 platform = i686-unknown-linux
 arch = i686
 os = linux
 system = i686, linux
 status = 
 major = 1
 minor = 0.0
 year = 2000
 month = February
 day = 29
 language = R

Search Path:
 .GlobalEnv, Autoloads, package:base

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] minor problem in barplot legend (PR#494)
bolker@zoo.ufl.edu