Skip to content

plot only x- and y-axis with origin, no box()

5 messages · Talloen, Willem [PRDBE], Marc Schwartz, Romain Francois +1 more

#
On Tue, 2007-06-19 at 15:15 +0200, Talloen, Willem [PRDBE] wrote:
See this post:

http://tolstoy.newcastle.edu.au/R/help/04/03/0911.html

HTH,

Marc Schwartz
#
Hello,

You are looking for the box function, and its bty argument. For example, 
this one will do the trick.

R> box( bty = "L")

?par gives more information on the potential values for bty.

Cheers,

Romain
Talloen, Willem [PRDBE] wrote:
#
Try:
Does that do what you want?  (see the bty parameter in ?par for details)

If you don't want the lines extending beyond the axes on the right and
top then you could do something more like:
You may also get what you want by playing with the xaxp and yaxp
parameters to par, but the bty='l' seems the easiest way to go.
#
Yes Greg,

Your provided solution does the job;
The easy way is indeed to do
but this cannot be used in combination with fixing tickmarks and changing width of the axes.

HOWEVER, there is still a small error. The width of the added y-axis has not the same width;
Any ideas?
Willem

-----Original Message-----
From: Greg Snow [mailto:Greg.Snow at intermountainmail.org]
Sent: Tuesday, 19 June 2007 18:23
To: Talloen, Willem [PRDBE]; r-help at stat.math.ethz.ch
Subject: RE: [R] plot only x- and y-axis with origin, no box()



Try:
Does that do what you want?  (see the bty parameter in ?par for details)

If you don't want the lines extending beyond the axes on the right and
top then you could do something more like:
You may also get what you want by playing with the xaxp and yaxp
parameters to par, but the bty='l' seems the easiest way to go.