(3D plotting in Makie) Which Julia package does contain "to_vertices"?

I would like to learn the 3D plot functionalities in Makie.

I am trying to an example on the official website of Makie; I have run the code with “using Meshes” as well:
https://makie.juliaplots.org/stable/examples/plotting_functions/band/#example_426580578809721985

But the REPL returns:

ERROR: MethodError: no method matching to_vertices(::Vector{Point3f})

Which Julia package should I install to run this example?

The examples in the docs are auto generated from the code, so if you’re on these versions (bottom of the docs):

These docs were autogenerated using Makie: v0.16.1, GLMakie: v0.5.0, CairoMakie: v0.7.0, WGLMakie: v0.5.0

The examples should run fine.

If doing something with Meshes creates this error, you’ll need to make a minimal reproduceable example to figure out what’s going on!

1 Like

Thank Simon for your time!!

After seeing your advice, I tried to upgrade the related packages but the example code did not work. I was using Julia 1.6.3. Then I installed Julia 1.7.1, then the feedback was “Wrong number of colors. Must be 5 or double. …” I could only make a square pyramid with 5 colors. Later I upgraded GLMakie under Julia 1.7.1, and now I get the nice cone!

So this is simply a problem of versioning of packages and software.