Mesh3d facecolor

I am trying to change the facecolor. Part of the issue is that I have a limited understanding of the various backends to Plots.jl . The same issue was raised here at various occasions. I continue to struggle.

x = [0, 1, 2, 0]
y = [0, 0, 1, 2]
z = [0, 0, 0, 0]
i = [0]
j = [1]
k = [2]
mesh3d(x, y, z; connections = (i, j, k),facecolor=RGB(1.,0.,0.))

I don’t think that is implemented yet.
Contributions welcome!

Sorry if that does not really answer you question but you can do this in Makie :

points = [0.0 0.0 0.0; 
          1.0 0.0 0.0; 
          2.0 1.0 0.0; 
          2.0 1.0 0.0;
          0.0 2.0 0.0;
          0.0 0.0 0.0];
faces = [1 2 3;
         4 5 6];
colors = [:red, :red, :red, :blue, :blue, :blue]
# colors = [0.2, 0.2, 0.2, 0.8, 0.8, 0.8] #for use with a colormap
f = Figure()
ax = Axis3(f[1,1], aspect=:data)
mesh!(ax, points, faces, color=colors)
# mesh!(ax, points, faces, color=colors, colormap=:plasma, colorrange=(0.0, 1.0))
f

Thanks! I am new to Makie. I will give it a look!

Edit: got Makie to work.

Q1: is it wise to refine the function map_z2color at e.g. https://plotly.com/python/v3/surface-triangulation/ in Julia?

Q2: is there a similar example in Makie ?

Thx!

1 Like