I'm not totally clear on what your question is, but here's a reprex with the code you've included, which will make it easier to discuss:
require(RColorBrewer)
#> Loading required package: RColorBrewer
require(lubridate)
#> Loading required package: lubridate
#>
#> Attaching package: 'lubridate'
#> The following object is masked from 'package:base':
#>
#> date
data <- runif(36, 1,6)
info<-matrix(data,12,3)
print(info)
#> [,1] [,2] [,3]
#> [1,] 4.366595 4.755404 1.475025
#> [2,] 4.301224 5.630490 5.581186
#> [3,] 2.095352 1.292955 2.376578
#> [4,] 5.452962 2.902681 1.325580
#> [5,] 3.914498 3.961479 1.012992
#> [6,] 5.125957 4.539389 2.524167
#> [7,] 3.712348 1.566362 4.543569
#> [8,] 4.944474 1.793858 1.040954
#> [9,] 3.598981 5.625973 1.469789
#> [10,] 2.468821 5.389284 3.116372
#> [11,] 3.506745 4.597780 5.504062
#> [12,] 1.605065 2.077325 4.244833
rownames(info)<-factor(month(1:12), levels=1:12, labels=month.abb, ordered=TRUE)
colnames(info)<-c("a","b","c")
barplot(info,beside=T,col=brewer.pal(n = 12, name = "RdBu"),legend=rownames(info),args.legend = list(x="bottomright", inset = c(-0.25, 0)))
#> Warning in brewer.pal(n = 12, name = "RdBu"): n too large, allowed maximum for palette RdBu is 11
#> Returning the palette you asked for with that many colors

data <- structure(list(W= c(1L, 3L, 6L, 4L, 9L), X = c(2L, 5L,
4L, 5L, 12L), Y = c(4L, 4L, 6L, 6L, 16L), Z = c(3L, 5L,
6L, 7L, 6L)), .Names = c("W", "X", "Y", "Z"), class = "data.frame", row.names = c(NA, -5L))
attach(data)
print(data)
#> W X Y Z
#> 1 1 2 4 3
#> 2 3 5 4 5
#> 3 6 4 6 6
#> 4 4 5 6 7
#> 5 9 12 16 6
colours <- c("red", "orange", "blue", "yellow", "green")
barplot(as.matrix(data), main="My Barchart", ylab = "Numbers", cex.lab = 1.5, cex.main = 1.4, beside=TRUE, col=colours)
legend("topleft", c("First","Second","Third","Fourth","Fifth"), cex=1.3, bty="n", fill=colours)

Created on 2019-06-11 by the reprex package (v0.3.0)