To calculate the probability mass contained within the interval:
x <- rnorm(1e6) ## data forming your empirical distribution
ll <- -1.96 ## lower bound of interval of interest
ul <- 1.96 ## upper bound of interval of interest
sum(x > ll & x < ul)/length(x)
# [1] 0.949735
And then to plot the histogram and the red box:
h <- hist(x, breaks=100, plot=FALSE) # Calculate but don't plot histogram
maxct <- max(h$counts) # Extract height of the tallest bar
## Or, if you want the height of the tallest bar within the interval
# start <- findInterval(ll, h$breaks)
# end <- findInterval(ul, h$breaks)
# maxct <- max(h$counts[start:end])
plot(h, ylim=c(0, 1.05*maxct), col="blue") # Plot, leaving a bit of space up top
rect(xleft = ll, ybottom = -0.02*maxct, # Add box extending a bit above
xright = ul, ytop = 1.02*maxct, # and a bit below the bars
border = "red", lwd = 2)
