Re: [R] Boxplot with linear (not categorical) x-axis

2018-10-01 Thread Luigi Marongiu
Thank you. On Fri, Sep 28, 2018 at 5:34 PM William Dunlap wrote: > > Use the 'at' argument to boxplot. E.g., > > > x <- rep(c(2,4,8,16), c(5,10,20,30)) > > y <- seq_along(x) > > par(mfrow=c(2,1)) > > boxplot(y~x, at=unique(x)) > > boxplot(y~x) > > > Bill Dunlap > TIBCO Software > wdunlap

Re: [R] Boxplot with linear (not categorical) x-axis

2018-09-28 Thread William Dunlap via R-help
Use the 'at' argument to boxplot. E.g., > x <- rep(c(2,4,8,16), c(5,10,20,30)) > y <- seq_along(x) > par(mfrow=c(2,1)) > boxplot(y~x, at=unique(x)) > boxplot(y~x) Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, Sep 28, 2018 at 3:05 AM, Luigi Marongiu wrote: > Dear all, > I am using

Re: [R] Boxplot with linear (not categorical) x-axis

2018-09-28 Thread Richard M. Heiberger
install.packages("HH") library(HH) system.file("demo/bwplot.examples.r", package="HH") demo("bwplot.examples", package="HH", ask=FALSE) ## your example dfA <- data.frame(X, Y=c(A, B, C)) dfA$X.factor <- factor(dfA$X) position(dfA$X.factor) <- c(1,3,5) bwplot(Y ~ X.factor,

[R] Boxplot with linear (not categorical) x-axis

2018-09-28 Thread Luigi Marongiu
Dear all, I am using boxplot to draw some data. Would be possible to have the X-axis linear (as in a scatter plot) instead of the standard categorical axis? The data I have is subdivided into three groups at the numerical values 1, 3, 5; boxplot treats these as categorical values; in fact, I can