Skip to content
Back to formatted view

Raw Message

Message-ID: <13e802630902131222m38cae83eg8523edd47bc15f6f@mail.gmail.com>
Date: 2009-02-13T20:22:52Z
From: Paul Johnson
Subject: I want axes that cross
In-Reply-To: <OF585B0EF2.3C5FDB91-ON8525755C.006C28AD-8525755C.006C4811@notes.duke.edu>

On Fri, Feb 13, 2009 at 1:42 PM, Daniel Moreira <daniel.moreira at duke.edu> wrote:
>
> Try defining the argument 'pos' in the axis command-line, like:
>
> x <- rnorm(100)
> z <- gl(2,50)
> y <- rnorm(100, mean= 1.8*as.numeric(z))
>
> plot(x,y,type="n", axes=F)
> points(x,y, pch="$",cex=0.7, col=z)
> axis(1, col="green", col.axis="green", pos=0)
> axis(2, col="red", col.axis="red", pos=-2)
>
> ________________________________________
> Daniel Moreira, MD
>

If you actually ran that code and still suggest it as the fix, then I
think you must be joking.  Pushing the axes into the middle of the
data cloud in order to make them cross is certainly not making a very
nice looking plot. Not only are there observations outside the area
framed by the axes, but there are axis labels that are overlapped by
observations and by the axes themselves.

PJ

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas