# Effects of using empty!(scene) in Makie.jl

**URL:** https://discourse.julialang.org/t/effects-of-using-empty-scene-in-makie-jl/116570
**Category:** Visualization
**Tags:** question
**Created:** [July 3, 2024, 8:12am UTC](https://discourse.julialang.org/t/effects-of-using-empty-scene-in-makie-jl/116570 "2024-07-03T08:12:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jeff\_Wack](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@Jeff\_Wack](https://discourse.julialang.org/u/Jeff_Wack)
#### Post date: [July 3, 2024, 8:12am UTC](https://discourse.julialang.org/t/effects-of-using-empty-scene-in-makie-jl/116570/1 "2024-07-03T08:12:19Z")

</div>

The following script throws an error:

> using CairoMakie  
> s = Scene()  
> scatter!(s,[0,0,1/2,1/2],[0,1/2,0,1/2])  
> display(s)  
> empty!(s)  
> scatter!(s,[0,0,-1/2,-1/2],[0,-1/2,0,-1/2])  
> display(s)

> KeyError: key :markercolor not found

Is this behavior a bug or not? The first call to scatter!() works as intended, and the scene is displayed. The second call to scatter!() throws the error. What is going on here?

---

<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: [July 3, 2024, 10:00am UTC](https://discourse.julialang.org/t/effects-of-using-empty-scene-in-makie-jl/116570/2 "2024-07-03T10:00:51Z")

</div>

That seems to be a bug, probably the theme gets cleared out and some plot init code assumes it’s still there. Could you open an issue to track this?

---

<div class="post-metadata">

### Author: ![Jeff\_Wack](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@Jeff\_Wack](https://discourse.julialang.org/u/Jeff_Wack)
#### Post date: [July 3, 2024, 5:03pm UTC](https://discourse.julialang.org/t/effects-of-using-empty-scene-in-makie-jl/116570/3 "2024-07-03T17:03:59Z")

</div>

I updated Makie and CairoMakie and the error is gone, I can empty and refill a scene as expected.
