s-news
[Top] [All Lists]

Graphic problem

To: s-news@lists.biostat.wustl.edu
Subject: Graphic problem
From: Tristan Lorino <tristan.lorino@lcpc.fr>
Date: Thu, 9 Mar 2006 10:04:45 +0100
Organization: LCPC
Reply-to: Tristan Lorino <tristan.lorino@lcpc.fr>
Hi,

Here is my code:

> x_data.frame(c(0,0,1,2,3),c("a","a","a","b","a"),c(.3,.5,.6,.1,.2))
> y_tapply(x[,3],x[,c(2,1)],mean)
> y
    0   1   2   3 
a 0.4 0.6  NA 0.2
b  NA  NA 0.1  NA

> plot(y[1,])

I would like to have, on the x-axis, the ticks and labels defined by
the 1st column in x -- that means ticks at 0, 1 and 3. But the plot
gives ticks at 1, 2 and 4. Even if I specify:

axis(1,at=seq(0,3,by=1),seq(0,3,by=1))
axis(2)

the first point is plotted at x=1!
How can I get the good axis?

Thank you,
Tristan Lorino


-- 
Laboratoire Central des Ponts et Chaussées
[Division ESAR ? Section AGR]
Route de Bouaye BP 4129
44341 Bouguenais Cedex
France
Tél 33 (0)2 40 84 56 18
Fax 33 (0)2 40 84 59 92


<Prev in Thread] Current Thread [Next in Thread>