# First example of Makie failed?

**URL:** <https://discourse.julialang.org/t/first-example-of-makie-failed/54926>\
**Category:** General Usage\
**Tags:** makie\
**Created:** [February 9, 2021, 1:44pm UTC](https://discourse.julialang.org/t/first-example-of-makie-failed/54926 "2021-02-09T13:44:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carsten](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Carsten](https://discourse.julialang.org/u/Carsten)\
**Post date:** [February 9, 2021, 1:44pm UTC](https://discourse.julialang.org/t/first-example-of-makie-failed/54926/1 "2021-02-09T13:44:27Z")

</div>

I running the first example of the documentation of Makie

```julia
using GLMakie
using AbstractPlotting
AbstractPlotting.inline!(true)
points = [Point2f0(cos(t), sin(t)) for t in LinRange(0, 2pi, 20)];
colors = 1:20;
figure, axis, scatterobject = scatter(points, color = colors, markersize = 15);

```

and got the following message:

```julia
ERROR: BoundsError: attempt to access Scene
  at index [3]
Stacktrace:
 [1] indexed_iterate(::Scene, ::Int64, ::Int64) at .\tuple.jl:90
 [2] top-level scope at REPL[17]:1

```

What’s wrong?

---

<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:** [February 9, 2021, 2:25pm UTC](https://discourse.julialang.org/t/first-example-of-makie-failed/54926/2 "2021-02-09T14:25:43Z")

</div>

If your plotting function returns a scene you’re on an old version, pre-figure. Check that nothing holds GLMakie back

---

<div class="post-metadata">

**Author:** ![Carsten](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Carsten](https://discourse.julialang.org/u/Carsten)\
**Post date:** [February 9, 2021, 3:45pm UTC](https://discourse.julialang.org/t/first-example-of-makie-failed/54926/3 "2021-02-09T15:45:41Z")

</div>

after adding GLMakie I’ve got the following version:

```julia
(@v1.5) pkg> st GLMakie
Status `C:\Users\benec\.julia\environments\v1.5\Project.toml`
  [e9467ef8] GLMakie **v0.1.13**

```

However, on [https://github.com/JuliaPlots/GLMakie.jl](https://github.com/JuliaPlots/GLMakie.jl) the version is already **v0.1.26**

Trying to add GLMakie#master the following error message appears:

```julia
(@v1.5) pkg> add GLMakie#master
   Updating git-repo `https://github.com/JuliaPlots/GLMakie.jl.git`
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package AbstractPlotting [537997a7]:
 AbstractPlotting [537997a7] log:
 ├─possible versions are: [0.9.0-0.9.27, 0.10.0-0.10.11, 0.11.0-0.11.2, 0.12.0-0.12.18, 0.13.0-0.13.11, 0.14.0-0.14.4, 0.15.0-0.15.17] or uninstalled      
 ├─restricted to versions 0.15.12-0.15 by GLMakie [e9467ef8], leaving only versions 0.15.12-0.15.17
 │ └─GLMakie [e9467ef8] log:
 │ ├─possible versions are: 0.1.26 or uninstalled
 │ └─GLMakie [e9467ef8] is fixed to version 0.1.26
 └─restricted by compatibility requirements with MakieThemes [e296ed71] to versions: [0.9.0-0.9.27, 0.10.0-0.10.11, 0.11.0-0.11.2, 0.12.0-0.12.18] — no versions left
   └─MakieThemes [e296ed71] log:
     ├─possible versions are: 0.0.2 or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions 0.0.2

```

Version of AbstractPlotting is:

```julia
(@v1.5) pkg> st AbstractPlotting
Status `C:\Users\benec\.julia\environments\v1.5\Project.toml`
  [537997a7] AbstractPlotting v0.12.18

```

---

<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:** [February 9, 2021, 4:02pm UTC](https://discourse.julialang.org/t/first-example-of-makie-failed/54926/4 "2021-02-09T16:02:13Z")

</div>

Remove makiethemes, I think it hasn’t been updated in a while

---

<div class="post-metadata">

**Author:** ![Carsten](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Carsten](https://discourse.julialang.org/u/Carsten)\
**Post date:** [February 9, 2021, 5:13pm UTC](https://discourse.julialang.org/t/first-example-of-makie-failed/54926/5 "2021-02-09T17:13:14Z")

</div>

Now I can run the first few examples given in [http://makie.juliaplots.org/stable/basic-tutorial.html](http://makie.juliaplots.org/stable/basic-tutorial.html)  
But now the next obstacle occured:

```julia
julia> vbox(
           lines(rand(10), linewidth = 20, color = :blue),
           lines(rand(10), linewidth = 20, color = to_colormap(:viridis, 10)) #mapping from a colormap to colors with 10 color points
       )
ERROR: UndefVarError: vbox not defined
Stacktrace:
 [1] top-level scope at REPL[45]:1

```

This example stems from [http://juliaplots.org/MakieReferenceImages/gallery/index.html](http://juliaplots.org/MakieReferenceImages/gallery/index.html) : color

Do I need to add an another package?

---

<div class="post-metadata">

**Author:** ![bicepjai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bicepjai/32/18158_2.png) [@bicepjai](https://discourse.julialang.org/u/bicepjai)\
**Post date:** [March 22, 2021, 8:03pm UTC](https://discourse.julialang.org/t/first-example-of-makie-failed/54926/7 "2021-03-22T20:03:17Z")

</div>

I have the same issue. I am on `mac Bigsur 11.1.1`  
I am using jupyterlab from a different machine and connecting to the server on which julia lives

```julia
Status `~/Projects/julia-env/Project.toml`
  [537997a7] AbstractPlotting v0.12.18
Status `~/Projects/julia-env/Project.toml`
  [e9467ef8] GLMakie v0.1.13

```

Have same issue

```julia
ERROR: BoundsError: attempt to access Scene

```

When i tried to remove and add latest versions

```julia
Pkg.rm("GLMakie")
Pkg.add(name="GLMakie", version="0.1.30")

```

I have the following issue

```julia
  Resolving package versions...

Unsatisfiable requirements detected for package GLMakie [e9467ef8]:
 GLMakie [e9467ef8] log:
 ├─possible versions are: [0.0.1-0.0.18, 0.1.0-0.1.30] or uninstalled
 ├─restricted to versions 0.1.30 by an explicit requirement, leaving only versions 0.1.30
 └─restricted by compatibility requirements with AbstractPlotting [537997a7] to versions: [0.0.1-0.0.18, 0.1.0-0.1.13] or uninstalled — no versions left
   └─AbstractPlotting [537997a7] log:
     ├─possible versions are: [0.9.0-0.9.27, 0.10.0-0.10.11, 0.11.0-0.11.2, 0.12.0-0.12.18, 0.13.0-0.13.11, 0.14.0-0.14.4, 0.15.0-0.15.27] or uninstalled
     ├─restricted to versions * by an explicit requirement, leaving only versions [0.9.0-0.9.27, 0.10.0-0.10.11, 0.11.0-0.11.2, 0.12.0-0.12.18, 0.13.0-0.13.11, 0.14.0-0.14.4, 0.15.0-0.15.27]
     └─restricted by compatibility requirements with MakieGallery [dbd62bd0] to versions: [0.9.0-0.9.27, 0.10.0-0.10.11, 0.11.0-0.11.2, 0.12.0-0.12.18]
       └─MakieGallery [dbd62bd0] log:
         ├─possible versions are: [0.0.1-0.0.9, 0.1.0-0.1.11, 0.2.0-0.2.17] or uninstalled
         └─restricted to versions * by an explicit requirement, leaving only versions [0.0.1-0.0.9, 0.1.0-0.1.11, 0.2.0-0.2.17]

```

I removed `MakieGallery` and now versions are

```julia
Status `~/Projects/radars/julia-env/Project.toml`
  [537997a7] AbstractPlotting v0.15.27
Status `~/Projects/radars/julia-env/Project.toml`
  [e9467ef8] GLMakie v0.1.26

```

Still I get

```julia
BoundsError: attempt to access Scene

```

---

<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:** [March 22, 2021, 8:12pm UTC](https://discourse.julialang.org/t/first-example-of-makie-failed/54926/8 "2021-03-22T20:12:13Z")

</div>

These examples are old, it’s really not advisable to try and learn Makie with them. They are not mentioned anywhere in the docs anymore, or if they are please tell me so I can remove them 🙂 Stick to the examples in the docs, which are continously built with every new version

---

<div class="post-metadata">

**Author:** ![bicepjai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bicepjai/32/18158_2.png) [@bicepjai](https://discourse.julialang.org/u/bicepjai)\
**Post date:** [March 22, 2021, 8:16pm UTC](https://discourse.julialang.org/t/first-example-of-makie-failed/54926/9 "2021-03-22T20:16:33Z")

</div>

Still have the same issue. Gave up and moving to gadfly 🙂

---

<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:** [March 23, 2021, 6:17am UTC](https://discourse.julialang.org/t/first-example-of-makie-failed/54926/10 "2021-03-23T06:17:11Z")

</div>

You have not shown the example which fails. But from the error message it looks like you’re using an old version with new syntax. Sorry you’re having difficulties. If you have the newest version, maybe you didn’t restart the repl after updating?
