[Rd] Legend frame error (PR#9236)

From: <tgibson_at_augustcouncil.com>
Date: Mon 18 Sep 2006 - 20:08:46 GMT


Hello,
The frame drawn around the legend appears to miscalculate when the x-axis decreases rather than increases. Pasted below is a simple testcase. When the x-axis decreases, the width of the legend frame appears to be calculated based on the length of the first item, rather than the maximum length of all items.

Thanks,
-TAG
Todd A. Gibson

line1=dpois(seq(0,50), 10)

par(mfcol=c(2,1))

plot(line1, col="blue", type="l")
legend(x=30,y=0.10, legend=c("binding","transcription","Random Genes"), col=c("red", "blue","black"),lty=c(1,1,2),lwd=c(2,2,1))

plot(line1, col="blue", type="l", xlim=c(50,0)) legend(x=30,y=0.10, legend=c("binding","transcription","Random Genes"), col=c("red", "blue","black"),lty=c(1,1,2),lwd=c(2,2,1))



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue Sep 19 06:15:20 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 Mon 18 Sep 2006 - 21:30:08 GMT.

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