# Putting background image to Makie plot

**URL:** <https://discourse.julialang.org/t/putting-background-image-to-makie-plot/77260>\
**Category:** Visualization\
**Tags:** plotting, makie\
**Created:** [March 1, 2022, 9:26pm UTC](https://discourse.julialang.org/t/putting-background-image-to-makie-plot/77260 "2022-03-01T21:26:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wsshin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wsshin/32/360_2.png) [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Post date:** [March 1, 2022, 9:26pm UTC](https://discourse.julialang.org/t/putting-background-image-to-makie-plot/77260/1 "2022-03-01T21:26:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![stillyslalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stillyslalom/32/45687_2.png) [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)\
**Post date:** [March 1, 2022, 10:07pm UTC](https://discourse.julialang.org/t/putting-background-image-to-makie-plot/77260/2 "2022-03-01T22:07:49Z")

</div>

You’ll probably want to mess around with aspect ratios and data ranges, but something like this:

```julia
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)

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/d/3d8d4583963cfa7f08a79f78be3b9695329f68f9.png)
