当我使用barplot
时,如果名称太大,则看不到条形名称。例如:
barplot(as.numeric(c(2, 4, 1, 6)), col = c("lightblue"), main="Barplot",
names.arg=c("This is bar 1...1", "This is bar 1...2",
"This is bar 1...3", "This is bar 1...4"),
xpd=TRUE, las=1, lwd=1, cex.names=0.5)
当我使用horiz=TRUE
时,我看不到左侧的名称:
barplot(as.numeric(c(2, 4, 1, 6)), col = c("lightblue"), main="Barplot",
names.arg=c("This is \nbar 2...1", "This is bar 2...2",
"This is bar 2...3", "This is bar 2...4"),
xpd=TRUE, las=1, lwd=1, horiz=TRUE, space=1)
使用名称中的换行符(例如“ This is \ nbar 2 ... 1”)或使用cex.names=0.5
减小文本大小可“解决”问题,但我希望添加空格以使名称适合。
是否有能力更改包括图形在内的整个图形的宽度?