Why doesn't Makie show pictures?

‘’’
using AbstractPlotting,Makie

x = [2 .* (i/3) .* cos(i) for i in range(0, stop = 4pi, length = 30)]
y = [2 .* (i/3) .* sin(i) for i in range(0, stop = 4pi, length = 30)]
z = range(0, stop = 5, length = 30)
a=meshscatter(x, y, z, markersize = 0.5, color = to_colormap(:blues, 30))
scene = Scene()
display(scene)
‘’’
I found a case from Makie.jl,which web site is http://juliaplots.org/MakieReferenceImages/gallery//3d/index.html
The Makie.jl’s web site is https://makie.juliaplots.org/stable/gallery
But when I run this code, it didn’t show the picture.How could show the picture?

You are creating an empty scene after your scatterplot. Make the scene first, then plot into it:

...
scene = Scene()
a = meshscatter!(scene, x, y, z, markersize = 0.5, color = to_colormap(:blues, 30))
...
2 Likes

How could I put two pictures in one scene and I can rotate any 3D image arbitrarily so that I can see the other angles?
When I try this code :
‘’’
using Makie
x=1:10
y=1:10
z = rand(10)
q = rand(10)
scene = Scene()
a=meshscatter(x, y, z)
b=meshscatter(x, y, q)
c=Scene(a,b)
display(c)
‘’’
It shows me " no method matching MeshScatter{…}(::UnitRange{Int64}, ::UnitRange{Int64}, ::Array{Float64,1})"


Is there any other way to display multiple images at the same time and rotate any image at will?

You could use scene = vbox(a,b) to create the Scene. The meshscatter command works with Makie v0.11.0. What is your version? ]st
See http://juliaplots.org/MakieReferenceImages/gallery/heatmap_interpolation/index.html

Please use ``` to quote your code and error messages in the future to improve readability.