Reputation: 3838
I have Julia 1.5.2 in my machine. Recently I installed a plotting package called Makie
and its backend GLMakie
in a Julia environment. The package was initially working fine. But then after adding a few other packages MakieThemes
, AbstractPlotting
, AlgebraOfGraphics
, and running the same code, is giving me an error (ERROR: BoundsError: attempt to access Scene at index [3]
).
A post on the net suggested that one of the packages might have downgraded GLMakie
package. Now even after removing and reinstalling GLMakie
package is still giving the same error. I have tried updating the package Pkg.update("GLMakie")
but the package doesn't seem to get upgraded (0.1.13
). On github there seems to be version 0.1.29
Does anyone know why it isn't getting upgraded.
Also for information here is the code.
using Makie
using GLMakie
using RDatasets
using DataFrames
#Data
df = dataset("datasets", "iris")
#Scatterplot
fig, axis, scatterObj = scatter(
df.SepalLength,
df.SepalWidth;
markersize = 9,
color = :lightblue
)
Upvotes: 2
Views: 391
Reputation: 6086
Glad you got things updated. The error you had was for a different reason though. Your figure is just the scatterplot here, so the Scene scatter(...)
returns has just the axis and the scatter figure, so two not three elements. ie:
#Scatterplot
axis, scatterObj = scatter(
df.SepalLength,
df.SepalWidth;
markersize = 9,
color = :lightblue
)
Upvotes: 1
Reputation: 3838
Figured out the issue. It was caused by StatsMakie
which is now deprecated.
Solved by removing StatsMakie (]rm StatsMakie
) which allowed the other 2 packages to get updated to their latest releases. Update Makie by Pkg.update(PackageSpec(name="Makie",version="0.12.0"))
and similarly for GLMarkie.
Upvotes: 2