# Makie: how to superpose figure on top of other figures?

**URL:** <https://discourse.julialang.org/t/makie-how-to-superpose-figure-on-top-of-other-figures/121374>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [October 16, 2024, 12:07pm UTC](https://discourse.julialang.org/t/makie-how-to-superpose-figure-on-top-of-other-figures/121374 "2024-10-16T12:07:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![filchristou](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/filchristou/32/26760_2.png) [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Post date:** [October 16, 2024, 12:07pm UTC](https://discourse.julialang.org/t/makie-how-to-superpose-figure-on-top-of-other-figures/121374/1 "2024-10-16T12:07:45Z")

</div>

I would like to plot a `Legend` figure on top of other figures, but the axis’ of the background figures emerges on top.  
How can I `translate!` the `Legend` figure to come out on top of everything ?

E.g.

```julia
let
	fig = Figure()
	a1, p1 = scatter(fig[1:10,1:2], rand(10); color=:blue)
	a2, p2 = scatter(fig[1:10,3:4], rand(10); color=:red)
	p3 = Legend(fig[5,2:3], [p1, p2], ["first scatter", "second scater"]; orientation=:horizontal)
	fig
end

```

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

I would like to hide the axis that come out on top of the `Legend`.  
How can I do that ?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [October 16, 2024, 12:13pm UTC](https://discourse.julialang.org/t/makie-how-to-superpose-figure-on-top-of-other-figures/121374/2 "2024-10-16T12:13:10Z")

</div>

You can push the whole scene that the Legend sits in forward:

```julia
let
	fig = Figure()
	a1, p1 = scatter(fig[1:10,1:2], rand(10); color=:blue)
	a2, p2 = scatter(fig[1:10,3:4], rand(10); color=:red)
	p3 = Legend(fig[5,2:3], [p1, p2], ["first scatter", "second scater"]; orientation=:horizontal)
    translate!(p3.blockscene, 0, 0, 100)
	fig
end

```

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