[Makie.jl] 3D voxelized visualization of a cubical matrix

Thank you for reporting the issue @almost6heads , we are taking a look into it. Probably related to the major refactor we did this week.

We should come back soon with a fix.

@almost6heads we checked the example internally and noticed that your vector of colors has Any as the element type:

julia> colors
5×5×5 Array{Any, 3}:
[:, :, 1] =
 :blue   :white  :white  :white  :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white

[:, :, 2] =
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white

[:, :, 3] =
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white

[:, :, 4] =
 :white  :white  :white  :white  :white
 :white  :white  :blue   :white  :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white

[:, :, 5] =
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :blue   :white
 :white  :white  :white  :white  :white
 :white  :white  :white  :white  :white

In the meantime, you can fix the type using:

colors = Symbol.(colors)

This should work.

Yes, that works! Thank you so much for your quick help.

You are welcome. You may be interested in the new Makie.voxels function if your colors are restricted to a pre-defined set of colors:

It can render larger grids based on that assumption.

2 Likes

@almost6heads we fixed the issue in Colorfy.jl and the new release should come out soon:

You can update your environment when the PR above is merged by the robots. Vectors of Any colors are better handled now, with a more informative error message.

Great, thanks again!