I am trying to plot a dataset using imagesc in Matlab.
The dataset is structured like this:
x1 y1 value1
x2 y2 value2
x3 y3 value3
...
The problem:
when I try to plot it like this:
imagesc(x,y,value)
the figure is only in one dimension.
It works well when I plot it with plot3, using the values for the z-axis.
How can I visualize this dataset using imagesc?
imagescneeds a matrix structure rather than the 3 vector you mentioned, and assumes that the data is used in uniform space grids. So I’d usescatterinstead to begin with. A way to still useimagescis to interpolate to an uniform grid and construct a matrix out of the 3 vectors you have: