Fun with Shapes and Colors

These various panels illustrate, in different ways, the range of colors available in the R base graphics package and the flexibility of that package in terms of its ability to create various kinds of colored shapes. This matters for those of us who are not always that enthusiatic about the range of plotting options available in otherwise quite useful R packages such as ggplot2.


The first two panels create, respectively, rectangles and circles colored with either randomly chosen colors or colors which you can select from the 40 or so which I have 'curated' from the 657 (!) colors available in the R base package (including at least 50 shades of gray).


The remaining panels are just 'fun' shapes which involved meeting certain programming challenges in order to create in R. Straightforward modifications of the script's parameters would enable modified shapes and sizes.