Members Only
Posted to Tutorials  /  Tags:

Drawing Squares and Rectangles in R

R makes it easy to add squares and rectangles to your plots, but it gets a little tricky when you have a bunch to draw at once. The key is to break it down to the elements.

About the Author

Nathan Yau is a statistician who works primarily with visualization. He earned his PhD in statistics from UCLA, is the author of two best-selling books — Data Points and Visualize This — and runs FlowingData. Introvert. Likes food. Likes beer.

Become a member. Learn to visualize your data. Gain instant access to tutorials.

Join Today


This is for people who want to learn to make and design data graphics. Your support goes directly to FlowingData, an independently run site.

What You Get

  • Instant access to tutorials on how to make and design data graphics
  • Source code and files to use with your own data
  • In-depth courses on visualization in R
  • Hand-picked links and resources from around the web