在两个方向(y和-y轴)上切割y轴的分组条形图

时间:2017-05-05 18:04:03

标签: r

我试图在两个方向(y和-y轴)上绘制带有分组条形图和切割y轴的图。我的代码和我的代码输出如下。我需要切割y轴,因为有两个条很高,这使得其他条在图中不清楚。

APP <- matrix(nrow=4, ncol=11)
line <- vector()
#
line <- c(-0.316, -0.256, 0.652, 0 , 0, 0, 0, 0, 0, 0,0)
APP[1,] <- line
# 
line <- c(0.618,-0.045,0.073,0.081,0.224,-0.324,0.459 , 0, 0, 0,0)
APP[2,] <- line
# 
line <- 
c(0.874,-0.021,0.344,0.154,-0.307,-1.072,0.849,-0.404,0.874,0.681,0.842)
APP[3,] <- line
# 
line <- 
c(0.082,0.226,-0.01,0.085,-98.742,192.403,10.566,-0.157,0.101,0.259,0.834)
APP[4,] <- line
df <- data.frame( data=APP)
names(df) <- names_LR
df
colours <- c("red", "orange", "blue", "yellow")
barplot(as.matrix(df), xlab = "Coefficients", cex.names=0.8, cex.axis=0.8,  
cex.lab = 1, cex.main = 1, beside=TRUE, col=colours)

enter image description here

0 个答案:

没有答案