manually create a plot frame in R

Posted by tfarkas on Stack Overflow See other posts from Stack Overflow or by tfarkas
Published on 2012-11-06T16:42:57Z Indexed on 2012/11/06 17:00 UTC
Read the original article Hit count: 244

Filed under:
|
|

I need to control the style of a basic xy plot in R, and so have build the plotting area like this:

frame()
plot.window(xlim=c(0,1), ylim=c(-.6, .8))
axis(1, at=c(0, .2, .4, .6, .8, 1.0), lwd=2)
axis(2, at=c(-.6, -.4, -.2, 0, .2, .4, .6, .8), lwd=2)

I cannot, however, figure out how to create a physical frame around this plot (with lwd = 2). Is it possible (necessary?) to use line() or polygon()? Or is there something more built-in for this?

I'm also interested in how to change the frame and axis weights for a plot created using the plot() function.

© Stack Overflow or respective owner

Related posts about r

    Related posts about plot