Skip to content

Can one set box line width within the matplot command?

2 messages · Ben Fairbank, Marc Schwartz

#
On Mon, 2007-03-12 at 11:01 -0600, Ben Fairbank wrote:
Try this:

 par(lwd = 3)
 matplot((-4:5)^2, main = "Quadratic", type = "l")

It's not any better than calling box(lwd = 3) after the plot, but is an
alternative. It may actually be worse as in some types of plots,
par("lwd") may affect some symbols.

matplot() calls plot() internally. In plot.default(), there is a
localBox() function used internally to draw the box if 'frame.plot =
TRUE'.  However, using 'lwd' as a function argument is not honored.

HTH,

Marc Schwartz