Skip to content
Prev 170590 / 398506 Next

I want axes that cross

On Fri, Feb 13, 2009 at 3:14 PM, Marc Schwartz
<marc_schwartz at comcast.net> wrote:
Thanks, Marc and everybody.

This last suggestion produces the graph I was trying for.

The other approaches that people suggest, using pos or xaxp, produce
other undesired changes in the tick marks or the position of the axes
relative to the data. xaxp offers the promise of a more intuitive
solution, except that, when using it, the tick marks are pushed off in
a bad way.  Your use of segments to draw the extensions of the axes
was the first intuition I had, but I did not know about the trick you
used to retrieve the size of the usr box.

More secrets of par, revealed.

Have you ever seen a drawing of the regions of an R plot with the
terminology that is used for parts?  Until I saw your example code, I
had not understood that the plot axes are placed at the absolute edge
of the user plotting region, for example.