I have an array of normalized vectors (1538 of them) forming a sphere. Also I has an array of numbers of the same size 1538. I want to plot something like this:
I tried the sphere
and surf
functions but I can't find a way to use my vectors. I figured there should be some way to do this.
Thanks a lot.
I think you can use delaunay to create a triangulation and plot that using trimesh or trisurf.
Both trimesh as trisurf accepts a fourth argument to specify the color of each vertex, add the option
'facecolor','interp'
to interpolate the color of each face between vertices.edit: I experimented a bit further on it, and since it's a sphere, I think convhull is better suited.
Example:
instead of
C
in the example you can use your own vector of values to specify the color