I have 6 datasets for which I need to plot boxplot using R in a single plot. Out of 6 , 2 are of more importance so I want to highlight them by shading their background . Is it possible to selectively shade background behind the boxplot for few leaving others as it is using boxplot() function of R ?

I have 6 datasets for which I need to plot boxplot using R in
Share
You can try to use function
rect()and give coordinates of lower left and upper right corner and color. Argumentlty=0ensures that there are no borders. Functionboxplot()is used twice becauserect()will hide first boxplots.add=TRUEin secondboxplot()ensures that plot is made on the same graphic.