2020-12-03

How to remove whiskers in a boxplot with the R Base Package

Title

Problem

We want to remove whiskers in a boxplot created with the R base package.

boxplot(mpg ~ cyl, data = mtcars)

Solution

We pass the arguments: whisklty = 0, staplelty = 0.

whisklty - to control the whisker line type (default: "dashed").
staplelty - to control the staple (= end of whisker) line type.

boxplot(mpg ~ cyl, data = mtcars, whisklty = 0, staplelty = 0)

Related posts

No hay comentarios:

Publicar un comentario

Nube de datos