I need to plot a graph in which each point (x,y,z) has a color assigned based on its value. How can I do this in Matlab? I have tried: scatter3(x, y, z, c) but I had difficulty with color.
Consider this example: (x_i,y_i,z_i) has value of v_i. I want the point with max value to be red and the point with min value to be blue.