I am trying to place a PNG image as a background of a Makie plot. The goal is to compare a curve plotted by lines!()
with some curves in the image. However I’m having a hard time finding an example. Is this possible?
You’ll probably want to mess around with aspect ratios and data ranges, but something like this:
using FileIO, GLMakie
img = (load ∘ download)("https://ia804509.us.archive.org/24/items/2412_20210805/2412a.png")
f = Figure()
ax1 = Axis(f[1, 1], aspect=DataAspect())
hidedecorations!(ax1)
image!(ax1, rotr90(img)) # probably want to supply x & y scale of data here
lines!(ax1, 350:550, 400:600)