R Language boxplot Additional boxplot style parameters.

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

Box

  • boxlty - box line type
  • boxlwd - box line width
  • boxcol - box line color
  • boxfill - box fill colors

Median

  • medlty - median line type ("blank" for no line)
  • medlwd - median line widht
  • medcol - median line color
  • medpch - median point (NA for no symbol)
  • medcex - median point size
  • medbg - median point background color

Whisker

  • whisklty - whisker line type
  • whisklwd - whisker line width
  • whiskcol - whisker line color

Staple

  • staplelty - staple line type
  • staplelwd - staple line width
  • staplecol - staple line color

Outliers

  • outlty - outlier line type ("blank" for no line)
  • outlwd - outlier line width
  • outcol - outlier line color
  • outpch - outlier point type (NA for no symbol)
  • outcex - outlier point size
  • outbg - outlier point background color

Example

Default and heavily modified plots side by side

par(mfrow=c(1,2))
# Default
boxplot(Sepal.Length ~ Species, data=iris)
# Modified
boxplot(Sepal.Length ~ Species, data=iris,
        boxlty=2, boxlwd=3, boxfill="cornflowerblue", boxcol="darkblue",
        medlty=2, medlwd=2, medcol="red", medpch=21, medcex=1, medbg="white",
        whisklty=2, whisklwd=3, whiskcol="darkblue",
        staplelty=2, staplelwd=2, staplecol="red",
        outlty=3, outlwd=3, outcol="grey", outpch=NA
        )

enter image description here



Got any R Language Question?