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

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to