Skip to content
Back to formatted view

Raw Message

Message-ID: <98Dec15.104909est.13460@mailgate.bank-banque-canada.ca>
Date: 1998-12-15T15:46:10Z
From: Paul Gilbert
Subject: legend

I am trying to put a legend below some plots as follows:

 x11()
 par(mfcol = c(2, 1), mar = c(5.1, 6.1, 4.1,  2.1))
 matplot(matrix(1:30,15,2), type="l", lty=1:2)
 par(mfg = c(2, 1, 2, 1))
 legend((par()$usr)[1:2], (par()$usr)[3:4], c("a","b"), lty = 1:2,  col=1:2, bty
= "y")

The letters "a" and "b" print but not the lines. If I omit par(mfg = c(2, 1, 2,
1)) then the
legend prints properly but on top of the plot in the first area.

Paul Gilbert


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._