Message-ID: <f8e6ff050803120659lcbccde9r6902128b08ce261@mail.gmail.com>
Date: 2008-03-12T13:59:24Z
From: Hadley Wickham
Subject: hello! i need help for a specific graphic issue
In-Reply-To: <793424.9223.qm@web23305.mail.ird.yahoo.com>
On Wed, Mar 12, 2008 at 5:37 AM, Giacomo Prodi <bonoricus at yahoo.it> wrote:
> hello, ladyes and gentlemans.
>
> check this:
>
> means<-c(4,6,8)
> stand.error<-c(0.1,0.3,0.5)
>
> now i've strongly tryed to scatterplot the
> means(y-axis),by showing their sd with the
> arrow(..,code=3,angle=90) function.
> The problem is that my x-axis has categorical values
> (say, factor(x)), and the arrows() can't recognize
> them as right coordinates.
> ?????
> thank you all in advance
> B.F. insubria university (varese)
This is a bit easier to do with ggplot2:
df <- data.frame(
trt = factor(c("a", "b", "c")),
mean = c(4,6,8),
se = c(0.1,0.3,0.5)
)
install.packages("ggplot2")
library(ggplot2)
qplot(trt, mean, data=df)
qplot(trt, mean, data=df, min=mean - se, max = mean + se, geom="pointrange")
Hadley
--
http://had.co.nz/