R 更改直方图标签的大小
基本图形,一些虚拟数据来说明我的情况:R 更改直方图标签的大小,r,graphics,R,Graphics,基本图形,一些虚拟数据来说明我的情况: dat <- rnorm(n = 1000, m = 0, sd = 1) hist(dat, breaks = 5, labels = TRUE, freq = TRUE, main = "Title") 然而,它似乎无法处理酒吧标签 有什么解决办法吗?试试: H <- hist(dat, breaks = 5, main = "Title") text(x = H$mids, y = H$counts, labels = H$count
dat <- rnorm(n = 1000, m = 0, sd = 1)
hist(dat, breaks = 5, labels = TRUE, freq = TRUE, main = "Title")
然而,它似乎无法处理酒吧标签
有什么解决办法吗?试试:
H <- hist(dat, breaks = 5, main = "Title")
text(x = H$mids, y = H$counts, labels = H$counts, cex = 0.5, pos = 3)
H
H <- hist(dat, breaks = 5, main = "Title")
text(x = H$mids, y = H$counts, labels = H$counts, cex = 0.5, pos = 3)