[R] Axes origins and labeling

Jim Lemon jim at bitwrit.com.au
Thu Jul 16 13:34:01 CEST 2009


Marlin Keith Cox wrote:
> I have re-labeled tick marks on the x axis.  The problem is that by using
> axes=FALSE, the axes disappears and when they are called back using
> axis(side=1)..etc. the axis on sides 1 and 2 do not meet at the bottom left
> corner of the graph.  I would also like to have the 3rd and 4th axes in
> there as well, all meeting in their respective corners.
>
> par(mfrow=c(1,2))
> gut<-c("Full", "Empty", "Full", "Empty")
> par(family="serif", cex=1.2, lab=c(length(gut),4,4))
> boxplot(Xc~Trt,data=error,ylab="Reactance (Ohms)",xlab="Stomach Fullness",
> ylab="Reactance (Ohms)", axes=FALSE,ylim=c(50,200))
> axis(side=1, at=c(1,2,3,4), labels=gut)
> axis(side=2)
> text(1.5,115, "Mid BIA")
> text(3.5,160, "Whole BIA")
> points(1,135, pch=2)
> points(2,135, pch=2)
> points(3,135, pch=17)
> points(4,135, pch=17)
>
>   
Hi Keith,
Try fullaxis in the plotrix package.
Jim




More information about the R-help mailing list