How to produce triangular heatmap without the baorder with imagesc?

9 次查看(过去 30 天)
I am trying to produce a triangular correlation plot. I can do that by putting NaNs for the upper or lower part, but then baorder showing the boundaries is also being ploted. is there way to remove it?
and produce something like this:
I attach my code and the fiugre example:
for i=1:25
for j=1:25
if i<j
aaa(i,j)=0;
else
aaa(i,j)=rand(1);
end
end
end
imagesc(aaa)
colormap(flipud(gray))

采纳的回答

Cris LaPierre
Cris LaPierre 2023-4-29
Are you talking about the axes outline? If so, use the box function to turn it off
for i=1:25
for j=1:25
if i<j
aaa(i,j)=0;
else
aaa(i,j)=rand(1);
end
end
end
imagesc(aaa)
box off
colormap(flipud(gray))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Distribution Plots 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by