image_plot: Draw a point or a rectangle on image

View source: R/oxy-draw.R

image_plotR Documentation

Draw a point or a rectangle on image

Description

Draws pixel or rectangle on top of specified magick image

Usage

image_plot(img, geometry, col = "green", pointsize = 5, ...)

Arguments

img

magick image

geometry

point or area geometry

col

character value of color (either name or hex value), Default: 'green'

pointsize

size of point, Default: 5

...

other parameters passed to 'image_draw()'

Details

Function makes distinction between drawing a point or drawing a rectangle only by the geometry. Use 'geometry_point()' and 'geometry_area()' to prepare and format geometries.

Value

magick image with drawing on it

See Also

device

Examples

## Not run: 
if(interactive()){
 frink <- image_read("https://jeroen.github.io/images/frink.png")
 image_plot(frink, geometry_area(50,35,80,150))
 image_plot(frink, geometry_point(70,70))
 }

## End(Not run)

dmi3kno/bunny documentation built on Dec. 7, 2022, 7:22 p.m.