From candrews at buffalo.edu  Thu Aug  7 11:33:36 2008
From: candrews at buffalo.edu (candrews at buffalo.edu)
Date: Thu,  7 Aug 2008 11:33:36 +0200 (CEST)
Subject: [Rd] Bug in placement of legend with title when xlim is decreasing
	(PR#12019)
Message-ID: <20080807093336.2A8A5282EFC1@mail.pubhealth.ku.dk>

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



[Rd] Bug in placement of legend with title when xlim is decreasing (PR#12019)
candrews at buffalo.edu