plot y Vs. X in heat-map plot
32 views (last 30 days)
darova on 17 Mar 2020
x = rand(1000,1);
y = rand(1000,1);
R = 0.1; % circle radius
D = pdist2([x y],[x y]); % create combinations of distances
C = sum(D<R); % how mayn points inside circle
Cris LaPierre on 16 Mar 2020
Heatmap accepts inputs of xvalues and yvalues. You may also specify a color variable.
However, I don't know that I'd consider heatmaps a y vs x plot. If that is what you want, perhaps consider using scatter, which allows you to specify a size and color for your pairs.
There is also gscatter if you want to color your data by groupings.