Dear R-Group, the first example is working as expected, but I need the plot without the box, normally no problem, but I am not able to get the x-axis formatted as times with the axis, command. I tried a lot of things, nothing was working so I used the most easy axis command in the second example here .... # working library(chron) # for times() library(graphics)# for axis par(cex=1.2,lwd=1) x <- c(times("12:15:00"),times("15:30:00")) y <- c(1,5) plot(x, y, type="n",adj=0, asp=0, xlab="", ylab="",font.axis=2,yaxt='n') # axis() command problem: par(cex=1.2,lwd=1) x <- c(times("12:15:00"),times("15:30:00")) y <- c(1,5) plot(x, y,axes=FALSE, type="n",adj=0, asp=0, xlab="", ylab="",font.axis=2,yaxt='n') axis(1) Maybe anybody could help me to disable the box around the plot and get the x-axis formatted as times Regards Knut
Try: plot(x, y, bty = "n", xaxs = "i", yaxs = "i") Actually I think there may be a bug here since the axes do not intersect. On 12/27/06, Knut Krueger <Knut-krueger at einthal.de> wrote:> Dear R-Group, > the first example is working as expected, but I need the plot without > the box, > normally no problem, but I am not able to get the x-axis formatted as > times with the axis, command. > I tried a lot of things, nothing was working so I used the most easy > axis command in the second example here .... > > # working > library(chron) # for times() > library(graphics)# for axis > par(cex=1.2,lwd=1) > x <- c(times("12:15:00"),times("15:30:00")) > y <- c(1,5) > plot(x, y, type="n",adj=0, asp=0, xlab="", ylab="",font.axis=2,yaxt='n') > > # axis() command problem: > par(cex=1.2,lwd=1) > x <- c(times("12:15:00"),times("15:30:00")) > y <- c(1,5) > plot(x, y,axes=FALSE, type="n",adj=0, asp=0, xlab="", > ylab="",font.axis=2,yaxt='n') > axis(1) > > > Maybe anybody could help me to disable the box around the plot and get > the x-axis formatted as times > > Regards Knut > > ______________________________________________ > R-help at stat.math.ethz.ch 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. >
Thank you for your answer> Actually I think there may be a bug here since the axes do not intersect. >Should I report this or did you report it already as a possible bug?
The axes do not intersect with this command. Is it a bug? plot(c(.51, .6), bty = "n", xaxs = "i", yaxs = "i") If I remove the bty = "n" then they do intersect. Also see: https://www.stat.math.ethz.ch/pipermail/r-help/2006-December/122734.html
On Thu, 28 Dec 2006, Gabor Grothendieck wrote:> The axes do not intersect with this command. Is it a bug? > > plot(c(.51, .6), bty = "n", xaxs = "i", yaxs = "i") > > If I remove the bty = "n" then they do intersect.box() is making it look like the axes are different. Axis()/axis() is behaving the same way in both cases.> par(mfrow=c(1,2)) > plot(c(.51, .6), bty = "n", xaxs = "i", yaxs = "i") > box(lty=2) > plot(c(.51, .6), xaxs = "i", yaxs = "i") > axis(4,col=2)[...] Charles C. Berry (858) 534-2098 Dept of Family/Preventive Medicine E mailto:cberry at tajo.ucsd.edu UC San Diego http://biostat.ucsd.edu/~cberry/ La Jolla, San Diego 92093-0717