使用下面的代码,我希望在每列上方显示一个数字,该数字对应于该列的y值.换句话说,我试图让"QnWeight_initial"在灰色条的顶部显示593,所以......
我的数据:
data<-structure(list(V1 = structure(c(2L, 1L), .Label = c("593", "QnWeight_initial"
), class = "factor"), V2 = structure(c(2L, 1L), .Label = c("566",
"Head"), class = "factor"), V3 = structure(c(2L, 1L), .Label = c("535",
"V1"), class = "factor"), V4 = structure(c(2L, 1L), .Label = c("535",
"V2"), class = "factor"), V5 = structure(c(2L, 1L), .Label = c("535",
"V3"), class = "factor"), V6 = structure(c(2L, 1L), .Label = c("482",
"Left_Leg"), class = "factor"), V7 = structure(c(2L, 1L), .Label = c("474",
"Left_Antenna"), …Run Code Online (Sandbox Code Playgroud) 我需要减少下面多个条形图中条形的宽度:
我尝试使用space这里的选项更改条形图(R)中的条形宽度,但似乎有多个条形图(即在我的情况下,每个变量4条形),该功能space不起作用.
这是一些重现情节的假数据:
mat_example = matrix(rnorm(40), 4, 10)
barplot(mat_example[,c(1:10)], beside = TRUE)
Run Code Online (Sandbox Code Playgroud)
谢谢你的任何建议.