3D Heatmap

You can use Plots.jl pyplot() or plotlyjs() backends to produce something like this:
Plots_plotlyjs_3d_surface_heatmap

Code example:

using Plots; plotlyjs()  #or: pyplot()
n = 300
θ = LinRange(0,π,n)
ϕ = LinRange(0,2π,n)
xx = @. sin(θ)*cos(ϕ')
yy = @. sin(θ)*sin(ϕ')
zz = @. cos(θ)*ones(n)'
surface(xx, yy, zz, fill_z = 5*sin.(10xx .* yy), size=(600,600))

The user function needs to be mapped onto the meshgrid and then fill_z takes over to assign colors from the colormap.

4 Likes