palette_visualize | R Documentation |
Visualize the color palette of an image
palette_visualize( im, palette, type = "bar", threshold = 1, monospace = FALSE, width, size, outline_width = 0, outline_color = c(0.5, 0.5, 0.5), margin = 0 )
im |
an image |
palette |
color palette |
type |
either "bar" or "circle |
threshold |
minor colors below this threshold is not displayed |
monospace |
either TRUE or FALSE. If FALSE, If FALSE, the length of the color chart is proportional to the percentage of occurrences of that color in the image. |
width |
width of color chart. A numeric value between 0 and 1. |
size |
output image resolution. Only works for the circle type. The default is 1024. |
outline_width |
outline width of color chart. The default is 0 (no outline). |
outline_color |
outline color. |
margin |
margin between picture and color chart. Only works for the bar type. A numeric value between 0 and 1. The default is 0. |
palette = palette_extract(regatta) im = palette_visualize(regatta, palette$df, "bar") plot(im) im2 = palette_visualize(regatta, palette$df, "circle") plot(im2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.