[R] axis help

From: <rich_at_thevillas.eclipse.co.uk>
Date: Wed, 06 Feb 2008 14:14:28 +0000

    Hi, i'm having trouble with my x and y axis. The commands i'm using are    below. The problem is that the y axis starts at coordinate 0,1 and the x    axis starts at coordinate 0,0. As far as I know the y axis can't start at 0    (because it's log scaled) ,so I would like to position the x axis at 0,1 but    don't know how to do this. Could anyone advise?

   Thanks

   Rich

   df3<-data.frame(x=c(10,11,115,12,13,14,16,17,18,21,22,23,24,26,27,28,29,3,30

,32,33,34,35,4,41,45,5,50,52,56,58,6,67,6738,68,7,8,9,),fq=c(8,11,1,2,4,4,2,
2,6,3,4,2,2,1,1,1,4,51,3,1,1,1,1,35,1,1,19,2,1,1,1,14,1,1,1,10,13,5,),fqcvd= c(5,8,1,1,3,3,2,2,5,3,4,2,2,0,1,1,3,13,2,1,1,1,1,17,1,0,11,2,1,1,1,7,1,1,1,7
,7,1,),fqcan=c(1,1,0,2,1,1,1,0,3,0,2,0,1,0,1,0,1,4,2,1,1,0,0,4,1,1,2,2,0,1,0
,2,0,1,1,2,3,1,),fqnondis=c(8,11,1,2,4,4,2,2,6,3,4,2,2,1,1,1,4,50,3,1,1,1,1,
   34,1,1,19,2,1,1,1,14,1,1,1,10,12,5,))    k3<-with(df3,rep(x,times=fq))
   kcvd3<-with(df3,rep(x,times=fqcvd))
   kcvd3<-c(kcvd3,rep(NA,times=length(k3)-length(kcvd3)))
   kcan3<-with(df3,rep(x,times=fqcan))
   kcan3<-c(kcan3,rep(NA,times=length(k3)-length(kcan3)))
   knondis3<-with(df3,rep(x,times=fqnondis))    knondis3<-c(knondis3,rep(NA,times=length(k3)-length(knondis3)))

   boxplot(kcvd3,kcan3,knondis3,log='y',    ylim=c(1,4000),at=c(0.5,0.6,0.7),boxwex = 0.05,axes=FALSE,col =    c("yellow","orange","red"))
   axis(1,at=c(0,0.6,1.1,1.6,2.1,2.6,3.1,3.6),labels=c(0,3,4,5,6,7,8,NA))    axis(2)



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. Received on Wed 06 Feb 2008 - 14:17:50 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Feb 2008 - 20:30:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive