Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 更改直方图标签的大小_R_Graphics - Fatal编程技术网

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)