[R] help on rmeta
Thomas Lumley
tlumley at u.washington.edu
Tue Jan 6 16:19:38 CET 2004
On Tue, 6 Jan 2004, Francesca Buffa wrote:
> Hello
>
>
>
> I'm trying to plot hazard risk values using the function metaplot with
> the specifications:
>
> > metaplot(HR,SE,W,labels=row.names(lc),xlab="Hazard
> Ratio",ylab="Covariates",
> logeffect=TRUE,logticks=FALSE,colors=meta.colors(box="black",lines="dark
> gray",zero="darkgray"),cex=1.5,cex.lab=1.5,font=3)
>
> However, in the plot the x axis starts after my minimum point;
> precisely, the x axis ticks start at 2 even if my minimum hazard is 0.44
> (i.e. exp(-0.8)); I've also tried to use xlim in metaplot (by fixing
> xlim<-c(0.44, 4)) but when I do this the HR error bars behave
> incorrectly (they shrink and I some cases disappear). can anyone suggest
> a cause/solution?
>
You don't want to change xlim, which has nothing to do with the axis -- it
specifies how wide the plot is. The solution is to specify xaxt="n", as
the help page says
xaxt: use '"n"' for no x-axis (to add a customised one)
You will get a metaplot with no x-axis, and you can then use
axis(1, at=, labels=) to put your own axis on. It turns out to be quite
hard to get good automatic tick marks and axis range for these plots,
since pretty() isn't designed for log scales and tends to overextend the
left end of the axis.
-thomas
More information about the R-help
mailing list