Makie.contour plot into an array

Is there a way to turn a Makie.contour plot into an array? Either where the contour pixels are 1s and everything else is 0 or where the pixels enclosed by the values are 1s and everything else is a 0. I can use ImageEdgeDetection.detect_edges to get a contour array but it’s much different than what Makie.contour returns

For example


Makie.colorbuffer(ax.scene) would give you pixels. A contour plot uses lines, so the underlying information is not represented as pixels. We use Contours.jl, so you could also call that directly if you need that data.

2 Likes