Heatmap plotting incorrect, black lines on X and Y axis outside the figure itself
Show older comments
I implemented the minutia heat map presented in this paper (page 7): https://arxiv.org/pdf/1909.09901.pdf
For this, the following code is implemented: (X, Y, and A data is attached in a .dat file)
function HeatMapCreator()
% Start plotting minutia
[X, Y, A] = GetMinData("TestData");
% Count Minutiea
n = length(X);
% set Width and Hight
W = 600; H = 750; K = 6;
% Create the matixes
MM = cell(K, 1);
M = zeros(H,W);
% Define the gussian paramater
GP = 2*2^2;
% Go through each pixel
for k = 1:6
for j = 1 : H
for i = 1 : W
Hijk = 0;
for t = 1 : n
Xt = X(t);
Yt = Y(t);
At = A(t);
%Calculate Cs
ED = sqrt((i-Xt)^2+(j-Yt)^2);
Cs = exp(-ED/GP);
%Calculate Co
DO = At - (2 * k * pi / K);
if (DO < -pi) || (DO > pi)
DO = 2 * pi - DO;
end
Co = exp(-DO/GP);
Hijk = Hijk + (Cs * Co);
end
M(j,i) = Hijk;
end
end
MM{k} = M;
end
% Show the 6 figures
for k = 1:6
figure(k)
heatmap(MM{k},'Colormap',gray,'GridVisible','off');
end
end
The following bugs does not make sense:
1- I am getting Black lines in the X and Y axis when plotting:

2- According to the paper, all 6 heatmaps should look different, as here:

But im my code, the matrixes are different from each other, but the heatmap is the same for all the 6 figues. I wonder weather the heat map function have anything to do regarding this error ?
All my figures looks like the first image.
Accepted Answer
More Answers (0)
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!