In this post I build two graph examples where my colleagues desired some shading effects in order to emphasize certain data. For this task, I used geom_rect() and geom_polygon() from the ggplot2 package. While geom_rect() draws rectangles (as its name suggests), with geom_polygon() one can draw rectangles and more, allowing for more flexibility. geom_polygon() is a bit more complex to use.
Written with Rmarkdown and rendered as html on Rpubs here.










You must be logged in to post a comment.