I am trying to get the same effect as highlighting a barcode graph in the same way that R by default isolates a rectangle with a border. In other words, I want the border that appears in the first image below to appear in the second image:
par(mfrow=c(2,1))
boxplot(count ~ spray, data = InsectSprays, col = "lightgray")
boxplot(count ~ spray, data = InsectSprays,
notch = TRUE, add = TRUE, col = "blue")
require(grDevices)
tN <- table(Ni <- stats::rpois(100, lambda=5))
r <- barplot(tN, col=rainbow(20))
lines(r, tN, type='h', col='red', lwd=2)
source
share