gutompf
gutompf

Reputation: 1355

how to draw only axis on plot, not rectangle

Sorry I cannot find this: when I draw any plot in R, I have arrround graph area rectangle. Its left side is X axis and bottom line is Y axis, which I want to have. But there are always also lines on the right side and on the top of graph area and these I do not want. How to suppress that two lines? I want only two lines - axis, not rectangle. Thanks (that rectangle which I mean includes axis)

Upvotes: 1

Views: 3724

Answers (2)

Manuel Ramón
Manuel Ramón

Reputation: 2498

See ?par, option bty

par(bty="l")

EDITED: An example:

plot(1:4)
par(bty="l")
plot(1:4)

Upvotes: 6

smu
smu

Reputation: 9047

you want frame.plot = FALSE

plot(1,1, frame.plot=F)

Upvotes: 3

Related Questions