rectangles | R Documentation |
This function generates a generative art ggplot object featuring multiple coloured rectangles.
rectangles(
n = 100,
max_height = 7,
max_width = 5,
size = 2,
main_col = "lightgrey",
col_palette = rcartocolor::carto_pal(n = 12, "Bold"),
bg_col = "white",
weight = 0.25,
s = 1234
)
n |
Number of rectangles. Default 100. |
max_height |
Maximum height of rectangle. Default 7. |
max_width |
Maximum width of rectangle. Default 5. |
size |
Line width of rectangles. Default 2. |
main_col |
Colour of non-highlighted rectangles. Default |
col_palette |
Vector of colours. Default |
bg_col |
Background colour. Default |
weight |
Sampling weight. Default 0.25. |
s |
Seed value. Default 1234. |
A ggplot object
rectangles()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.