# Unable to add multiple plots to a single scene in Makie

**URL:** <https://discourse.julialang.org/t/unable-to-add-multiple-plots-to-a-single-scene-in-makie/87527>\
**Category:** Visualization\
**Tags:** plotting, makie\
**Created:** [September 20, 2022, 5:14pm UTC](https://discourse.julialang.org/t/unable-to-add-multiple-plots-to-a-single-scene-in-makie/87527 "2022-09-20T17:14:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![malton31](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@malton31](https://discourse.julialang.org/u/malton31)\
**Post date:** [September 20, 2022, 5:14pm UTC](https://discourse.julialang.org/t/unable-to-add-multiple-plots-to-a-single-scene-in-makie/87527/1 "2022-09-20T17:14:23Z")

</div>

I am new to Makie and Julia in VSCode and I am trying to plot two plots in one scene. My code is

```julia
using Makie, GLMakie

GLMakie.activate!()
Makie.inline!(true)

x = rand(100)
y = rand(100)
z = rand(100)

scene = scatter(x, y, color=:forestgreen, markersize=7.5)
scene = scatter!(y, z, color=:crimson, markersize=7.5)

```

The first time (when I call `scatter`) my code evaluates to a `FigureAxisPlot()` and I get a plot on the side. But the second time (when I call `scatter!`) my code evaluates to a `Scatter{Tuple{Vector{Point{2, Float32}}}}` and the plot doesn’t change and a new plot is not created. I am following the Julia for the Talented Amateur series, and this code seems to work for them. I’m not sure how to fix it.

I am running Julia 1.8 on a Mac in VSCode and I ran `up` in the `pkg>` prompt so I believe all the packages are updated to the latest versions.

---

<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:** [September 20, 2022, 5:19pm UTC](https://discourse.julialang.org/t/unable-to-add-multiple-plots-to-a-single-scene-in-makie/87527/2 "2022-09-20T17:19:47Z")

</div>

Check out the basic tutorial in the docs 🙂 [Basic Tutorial](https://docs.makie.org/stable/tutorials/basic-tutorial/)

`Scene` used to be the return value of plotting functions quite a long time ago, I assume the tutorial you followed was made in that era.

---

<div class="post-metadata">

**Author:** ![malton31](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@malton31](https://discourse.julialang.org/u/malton31)\
**Post date:** [September 20, 2022, 5:23pm UTC](https://discourse.julialang.org/t/unable-to-add-multiple-plots-to-a-single-scene-in-makie/87527/3 "2022-09-20T17:23:04Z")

</div>

Oh okay, thank you! The tutorial was from Nov 2020 so I didn’t think things could change that fast, but it is good to know.

---

<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:** [September 20, 2022, 5:52pm UTC](https://discourse.julialang.org/t/unable-to-add-multiple-plots-to-a-single-scene-in-makie/87527/4 "2022-09-20T17:52:02Z")

</div>

I quickly checked and we released this in January 2021 [[ANN] Makie Update: Figures And Integrated Layouts](https://discourse.julialang.org/t/ann-makie-update-figures-and-integrated-layouts/52800)

Two years is a long time for us 🙂 Obviously not a lot in terms of absolute time, but many many things changed in this package along the way. I know it’s annoying to find outdated teaching material, but often these breaking changes were just very necessary so we don’t get stuck with old bad patterns.

---

<div class="post-metadata">

**Author:** ![malton31](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@malton31](https://discourse.julialang.org/u/malton31)\
**Post date:** [September 21, 2022, 1:16am UTC](https://discourse.julialang.org/t/unable-to-add-multiple-plots-to-a-single-scene-in-makie/87527/5 "2022-09-21T01:16:17Z")

</div>

Yeah definitely, after spending the last 5 hours on tutorials I definitely appreciate the change!
