candrews at buffalo.edu
2008-Aug-07 09:33 UTC
[Rd] Bug in placement of legend with title when xlim is decreasing (PR#12019)
Full_Name: Chris Andrews Version: 2.7.1 OS: Windows Submission from: (NULL) (74.92.48.53) The following code shows that the legend is misplaced when a title is included AND xlim specifies a decreasing x axis. -------------- matplot(1:5, matrix(rnorm(5*3), nrow=5), type="l", col=1:3, lty=1, lwd=3, xlim=c(5,1)) legend("bottomleft", col=1:3, lty=1, legend=paste("line", letters[1:3])) legend("topleft", col=1:3, lty=1, legend=paste("line", letters[1:3]), title="Hello") legend("bottomright", col=1:3, lty=1, legend=paste("line", letters[1:3])) legend("topright", col=1:3, lty=1, legend=paste("line", letters[1:3]), title="Hello") --------------- R version 2.7.1 (2008-06-23) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base