How can I increase the thickness of the lines that outline "box" part of a boxplot using either the base R plot or boxplot function? That is, how do I thicken the lines of the box that defines the quantiles.
For a plot like this:
boxplot(rnorm(100,50,10), horizontal = TRUE, notch = TRUE)
I'm guessing I need to include a pars =
statement like
boxplot(rnorm(100,50,10), horizontal = TRUE, notch = TRUE, pars = ...)
EDIT:
My guess regarding the use of pars =
comes from a first glance at the documentation for boxplot
which indicates that pars =
can call "a list of (potentially many) more graphical parameters, e.g., boxwex or outpch; these are passed to bxp (if plot is true)..."
To set plot line width/thickness in R, call plot() function and along with the data to be plot, pass required thickness/line-width value for the “lwd” parameter.
To change line width, just add argument size=2 to geom_line().
When we create a boxplot for a column of an R data frame that contains outlying values, the points for those values are smaller in size by default. If we want to increase the size for those outlying points then outlier. size argument can be used inside geom_boxplot function of ggplto2 package.
We can do this by using lwd argument of geom_boxplot function of ggplto2 package.
See the boxlwd
parameter as discussed in ?bxp
(linked to from ?boxplot
). E.g.
boxplot(rnorm(100,50,10), horizontal = TRUE, notch = TRUE, boxlwd = 4)
Are you talking about the rectangle that surrounds the plot area? If so, then this can follow you plot call:
box(lwd=5)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With