Closed TimTaylor closed 1 year ago
Thanks Tim! Would a named-vector attribute be useful? I've got something like this on the go:
> click_pixels(3, 3, 3, colours = c("red", "blue, "yellow"))
Click squares in the plot window. Press <Esc> to end.
Then after clicking squares and pressing Esc:
[,1] [,2] [,3]
[1,] 1 0 1
[2,] 0 2 0
[3,] 1 0 1
attr(,"colours")
0 1 2
"red" "blue" "yellow"
Aye - that's perfect.
Not quite #14. It would be nice if
click_pixels()
returned the colours used in the output just above the image matrix.