How can i show the intensity of my plot on a heat map?

I have two vectors: "point" - which is a 13x2 vector containing a list of x and y coordinates, "averagedistance" - which is the average error of a user's selection when they try and select the 13 coordinates (in "point") on a touchscreen, this is a 13X1 vector.
How can I display a 2d heat map that shows the intensity of this average error made by the user, based on the info. in "averagedistance"? I'd like to plot the coordinates in "point" but the colour of the points depend on the value of "averagedistance".
I've used "scatter3" but that doesn't merge the colours to produce a heat map.

Answers (3)

Let x,y,z be your data...
dt = delaunayTriangulation(x,y) ; % delaunay triangulation
tri = dt.ConnectivityList ; % nodal connectivity
trisurf(tri,x,y,z)
I tried inputting that and swapping the variables for my own, but I can't make sense of the plot, there are overlapping planes and isn't what I was expecting. I was kind of hoping for it to look something like the attached image, with blended colours. (obviously it would look different with my data)

2 Comments

Perfect...now where is data? It can be plotted if data is given.
point =
0.8147 0.4854
0.9058 0.8003
0.1270 0.1419
0.9134 0.4218
0.6324 0.9157
0.0975 0.7922
0.2785 0.9595
0.5469 0.6557
0.9575 0.0357
0.9649 0.8491
0.1576 0.9340
0.9706 0.6787
0.9572 0.7577
and
averagedistance =
0.7431
0.3922
0.6555
0.1712
0.7060
0.0318
0.2769
0.0462
0.0971
0.8235
0.6948
0.3171
0.9502

Sign in to comment.

Categories

Asked:

on 12 Mar 2018

Commented:

on 12 Mar 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!