How to embed 2D slices of an array in a 3D plot using plot recipes?

Given a 3D array, I would like to produce the following visualization:

The main problem I have is that I don’t know how to embed 2D slices in a 3D plot using plot recipes. Appreciate if you can help, or if you can provide an alternative solution.

You can follow this “tutorial” for Makie:
There is a bug in there right now, which I can try to fix today :wink:
I think it’s just that colornorm is wrong in heatmap, you can play around it yourself in this command:

   hscene, axis2, axis2, volume[][indices...], colornorm = (0, 1)
1 Like

Thank you @sdanisch, I am looking for a RecipesBase.jl, I should have been more specific, sorry. The visualization of the brain is awesome anyways!

Is it possible to write a recipe that consumes a 3D array and produces the slices as heatmaps?

fair enough :wink: i was thinking to turn it into a makie recipe, but i guess thats also not what you want then :wink:

A Makie recipe would be great as I plan to move Plots -> Makie at some point in the future when things are more stable and working. :+1:

I’d use Makie for this. But AFAIK Makie doesn’t yet have a lightweight recipe format.

It would be nice to keep in mind these embeddings of lower dimensional objects in a higher-dimensional space while designing the new recipes system :+1: