First example of Makie failed?

I running the first example of the documentation of Makie

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:

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?

1 Like

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

after adding GLMakie I’ve got the following version:

(@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 the version is already v0.1.26

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

(@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:

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

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

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

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 : color

Do I need to add an another package?

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

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

ERROR: BoundsError: attempt to access Scene

When i tried to remove and add latest versions

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

I have the following issue

  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

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

BoundsError: attempt to access Scene

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 :slight_smile: Stick to the examples in the docs, which are continously built with every new version

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

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?

1 Like