# Coloring background planes of 3d plot in Makie

**URL:** <https://discourse.julialang.org/t/coloring-background-planes-of-3d-plot-in-makie/133247>\
**Category:** General Usage\
**Tags:** makie, glmakie\
**Created:** [October 17, 2025, 4:01pm UTC](https://discourse.julialang.org/t/coloring-background-planes-of-3d-plot-in-makie/133247 "2025-10-17T16:01:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gus\_Hart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gus_hart/32/6987_2.png) [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Post date:** [October 17, 2025, 4:01pm UTC](https://discourse.julialang.org/t/coloring-background-planes-of-3d-plot-in-makie/133247/1 "2025-10-17T16:01:20Z")

</div>

I’m making a 3d plot, like the one shown below, but I can’t figure out how to color the background planes (or the “axis planes”, not sure what to call them). Changing the `Figure()` background colors the entire scene’s background (not what I want) and setting `backgroundcolor=:red` in the `Axis3D` doesn’t change anything. My reading of the docs says this should work, but it doesn’t. Am I misunderstanding something? (MWE example is not the same as the figure shown, to keep the length of the post shorter.)

```julia-auto
using GLMakie

# Create your figure and axis
fig = Figure()
ax = Axis3(fig[1, 1],backgroundcolor=:red) # backgroundcolor=:red doesn't do anything

x = y = range(-5, 5, length=50)
z = [sin(sqrt(x^2 + y^2)) for x in x, y in y]
surface!(ax, x, y, z)
display(fig)

```

 ![Picture1](https://global.discourse-cdn.com/julialang/original/3X/9/3/93e033892a1586554aa63d2c8722d4b1542fa11d.png)

---

<div class="post-metadata">

**Author:** ![technocrat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/technocrat/32/220947_2.png) [@technocrat](https://discourse.julialang.org/u/technocrat)\
**Post date:** [October 17, 2025, 6:37pm UTC](https://discourse.julialang.org/t/coloring-background-planes-of-3d-plot-in-makie/133247/2 "2025-10-17T18:37:37Z")

</div>

I read them the same way you do. xypanelcolor, xzpanelcolor and yzpanelcolor just blank the entire figure. I didn’t see anything in github issues on this.

---

<div class="post-metadata">

**Author:** ![JonasWickman](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@JonasWickman](https://discourse.julialang.org/u/JonasWickman)\
**Post date:** [October 17, 2025, 8:13pm UTC](https://discourse.julialang.org/t/coloring-background-planes-of-3d-plot-in-makie/133247/3 "2025-10-17T20:13:03Z")

</div>

It seems like the background color on the panel ‘walls’ are getting clipped. The following works, although it may have some unintended other side effects regarding display outside the display area:

```julia-auto
fig = Figure()
ax = Axis3(fig[1, 1]; 
     xypanelcolor = :red, 
     xzpanelcolor = :red, 
     yzpanelcolor = :red, 
     clip = false
) 

x = y = range(-5, 5, length=50)
z = [sin(sqrt(x^2 + y^2)) for x in x, y in y]
surface!(ax, x, y, z)
display(fig)

```

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

---

<div class="post-metadata">

**Author:** ![technocrat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/technocrat/32/220947_2.png) [@technocrat](https://discourse.julialang.org/u/technocrat)\
**Post date:** [October 17, 2025, 10:46pm UTC](https://discourse.julialang.org/t/coloring-background-planes-of-3d-plot-in-makie/133247/4 "2025-10-17T22:46:50Z")

</div>

If having the panels the same color as the scene is acceptable that can be accomplished more simply with

```julia-auto
using GLMakie

# Create your figure and axis
fig = Figure(backgroundcolor=:red)
ax = Axis3(fig[1, 1])

x = y = range(-5, 5, length=50)
z = [sin(sqrt(x^2 + y^2)) for x in x, y in y]
surface!(ax, x, y, z)
display(fig)

```

 ![CleanShot 2025-10-17 at 15.45.57@2x](https://global.discourse-cdn.com/julialang/original/3X/e/a/ea54cd317835d1c70cf8bc74a5a7a59924a0bf37.png)
