df <- datana::fishgrowth
xyboxplot(x=df$length,y=df$scale)
xyboxplot(x=df$length,y=df$scale,col.dots = "red",
xlab="Variable X")
xyboxplot(x=df$length,y=df$scale,xlab="Variable X")
## dots with alpha channel
xyboxplot(x=df$length,y=df$scale,xlab="Variable X",
transp.dots = 0.4)
## with categorical x
xyboxplot(x=df$age,y=df$length,x.category = TRUE)
## fixed x axis limits
xyboxplot(x=df$age,y=df$length,x.category = TRUE, xlim = c(0,10))
## x marks width to .5
xyboxplot(x=df$age,y=df$length,x.category = TRUE, xlim = c(0,10),
class.ticks.lwd = .5)
## x marks red and width 2
xyboxplot(x=df$age,y=df$length,x.category = TRUE, xlim = c(0,10),
class.ticks.lwd = 2, class.ticks.col = "red")
## larger dots
xyboxplot(x=df$age,y=df$length,x.category = TRUE, xlim = c(0,10),
cex.dots = 1.5)
## print classes ticks
xyboxplot(x=df$age,y=df$length,x.category = TRUE, xlim = c(0,10),
class.marks = FALSE, class.ticks.col = "green")
### the x-variable not recorded such as a categorical variable
df <- datana::fishgrowth
## print classes ticks, by default with red color
xyboxplot(x=df$length, y=df$scale)
## don't print ticks
xyboxplot(x=df$length, y=df$scale, class.ticks=FALSE)
## print classes marks values
xyboxplot(x=df$length, y=df$scale, class.marks=TRUE)
## print classes marks values without ticks
xyboxplot(x=df$length, y=df$scale, class.marks=TRUE, class.ticks=FALSE)
## change class marks and ticks colors
xyboxplot(x=df$length, y=df$scale, class.marks=TRUE,
class.marks.col = "red",
class.ticks.col = "blue")
## bigger ticks
xyboxplot(x=df$length, y=df$scale, class.marks=TRUE,
class.marks.col = "red",
class.ticks.col = "blue", class.ticks.lwd=3)
## Changing the number of the X-variable classes
xyboxplot(x=df$length,y=df$scale,num.classes=5)
## Defining the classes not by percentiles, but by fixed values
xyboxplot(x=df$length,y=df$scale,xlim=c(0,410),
ylim=c(0,20),num.classes=4,
segre.type="fixed",limi.classes=c(140,195,250))
## Note that the limits must be in agreement with the num.classes
xyboxplot(x=df$length,y=df$scale,xlim=c(0,410),ylim=c(0,20),
num.classes=5,segre.type="fixed",limi.classes=c(100,160,200,250))
Run the code above in your browser using DataLab