[S] graphics questions

Andrew McCulloch (andrew.mcculloch@lshtm.ac.uk)
Thu, 7 May 1998 10:30:37 +0000

I have two questions about graphs. First, I have the data below
and plot day against coefficient. I then wish to add error bars.

day coefficient se
Monday 1.2 0.2
Tuesday etc.


I get the error bars plotted but they are not on the correct y-scale
,as I expected, being clustered at the left-hand edge of the plot.

Second, I am modelling a time trend in a model formula using a
spline. So I do the following :

time <- 1:730
fit <- glm(outcome ~ ns(time,df=12),family=poisson)

The y-scale of the plot naturally runs from 1 to 730 but I would like
this to be in dates from 04/01/93 to 03/31/95. I have tried adding
dates to the model formula but S then tried unsucessfully to plot
a persp plot.

I know there will be simple answers to these points.
Sorry if seems trivial but I always find controlling graphics the
most difficult part of S to understand.

yours sincerely
Andrew McCulloch
London School of Hygiene and Tropical Medicine

This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news