I want to plot only median for my two dataset. It can be also done using segments function in R but I don't know how. So, I decided using boxplot function but still couldn't figure out how to hide everything and show just medians.
Thanks
You can set the graphical parameters which are documented under ?bxp
:
boxlty: box outline type
whisklty: whisker line type
staplelty: staple (= end of whisker) line type
Setting outline = FALSE
suppresses drawing outliers.
boxplot(count ~ spray, data = InsectSprays, outline = FALSE, boxlty = 0,
whisklty = 0, staplelty = 0)
should draw a boxplot with just the horizontal lines at the medians.
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