Re: [R] lattice: how to use a log scale on the x-axis with the bwplot function

2022-12-10 Thread Bert Gunter
... and here's a version where the x variable is different than y. It's basically the same. set.seed(123) y <- runif(40,min=0, max= 10) x <- seq(0,10, length = 40) ## 5 equally spaced groups labeled by log10 of the center ## of the intervals xrng <- range(x) eps <- .0001*c(-1,1)*diff(xrng) ## see

Re: [R] lattice: how to use a log scale on the x-axis with the bwplot function

2022-12-10 Thread Bert Gunter
If Deepayan's suggestion does not suit and especially *if* I understand what you want to do correctly, then it seems to me that it is straightforward to create the groups and group labels manually: ## in verbose detail to hopefully improve clarity set.seed(123) ## for reprex y <- runif(40,min=0,

Re: [R] lattice: how to use a log scale on the x-axis with the bwplot function

2022-12-10 Thread Deepayan Sarkar
Log-scales for the "factor" variable in bwplot() is not allowed. You could, however, use the panel function panel.bwplot() with xyplot(num ~ num). The potential problem with that is the box widths, which panel.bwplot() will not know how to compute. See if the following gives you a reasonable star

[R] lattice: how to use a log scale on the x-axis with the bwplot function

2022-12-10 Thread Laurent Rhelp
Dear R-Help list,    I would like to use bwplot from the lattice package with a log scale both on the x-axis and the y-axis but I do not know how to do that because I do not know how to change the factor x-axis in a numeric x-axis.  Here is my example: library(lattice) # the mock data y <-