0

I am trying to make a plot with grouped barplots and a cut y axis in two directions (y and -y axis). My code and the output of my code are below. I need to cut the y-axis since there is two bars are so tall which makes the other bars not clear in the graph.

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

Uwe
  • 41,420
  • 11
  • 90
  • 134
Tanash
  • 461
  • 1
  • 5
  • 8
  • Possible duplicate of [Grouped barplot with cut y axis](http://stackoverflow.com/questions/24202245/grouped-barplot-with-cut-y-axis) – digEmAll May 05 '17 at 18:08
  • No I need to cut the positive Y and negative Y axis, and the post only cuts the positive Y axis. I tried this http://stackoverflow.com/questions/24202245/grouped-barplot-with-cut-y-axis , but I couldn't make it with negative Y axis. – Tanash May 05 '17 at 18:16
  • you are right unfortunately it seems multiple gaps are not supported... is it supported by `gap.plot`, but not by `gap.barplot`... – digEmAll May 05 '17 at 18:32

0 Answers0