draw_rect | R Documentation |
Add a rectangle to an image. Like other native CImg drawing functions, this is meant to be basic but fast. Use implot for flexible drawing.
draw_rect(im, x0, y0, x1, y1, color = "white", opacity = 1, filled = TRUE)
im |
an image |
x0 |
x coordinate of the bottom-left corner |
y0 |
y coordinate of the bottom-left corner |
x1 |
x coordinate of the top-right corner |
y1 |
y coordinate of the top-right corner |
color |
either a vector, or a string (e.g. "blue") |
opacity |
0: transparent 1: opaque. |
filled |
fill rectangle (default TRUE) |
an image
Simon Barthelme
implot,draw_circle
draw_rect(boats,1,1,50,50,"darkgreen") %>% plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.