LoginSignup
5
5

More than 5 years have passed since last update.

箱ヒゲ図のラベルにサンプル数を併記する

Last updated at Posted at 2013-02-15

Rで箱ヒゲ図 (boxplot) のラベルにサンプル数を併記したいとき。

bp <- boxplot(data)
mtext(paste("(n=", bp$n, ")", sep=""), side=1, line=2.1, at=seq(along=bp$n))

こんな感じになる。

boxplot.png

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5