Visualize 3D data in Julia

Viewed 77

I know the function:

surf(lst1,lst2,lst3)

Is there another one that does the same thing but in the 2d graph, similar to the heat map?

2 Answers

Plotting lst1, lst2 with zcolor = lst3 using a large marker or a scatter plot would do that.

using Plots

x = 0.0:π/20:2π
y = sin.(x)
z = tanh.(x)

plot(x, y, marker = 10, zcolor = z)

I’m not clear on the type of graph that you want. The closest thing I can think of for a surface plot in 2D would be a contour plot. The Plots interface has a contour() function, which you can call the same way as the heatmap() function (but has, of course, its own special keywords).

Related