If you’re plotting this image with a package like Plots (or probably Makie for that matter), you actually don’t do this as a separate function but rather just by providing vectors of x and y coordinates to plot
along with the image you want to plot