[R] Axes origins and labeling

Greg Snow Greg.Snow at imail.org
Wed Jul 15 22:59:58 CEST 2009


Look at the box function, or use xaxt='n' and/or yaxt='n' rather than axes=FALSE.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Marlin Keith Cox
> Sent: Wednesday, July 15, 2009 2:44 PM
> To: r-help at r-project.org
> Subject: [R] Axes origins and labeling
> 
> 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)
> 
> Thanks ahead of time.
> 
> Keith
> 
> --
> Keith Cox, Ph.D.
> Alaska NOAA Fisheries, National Marine Fisheries Service
> P.O. Box 464
> Sitka, Alaska, 99835
> 
> 907 752-0563
> marlinkcox at gmail.com
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list