How to produce triangular heatmap without the baorder with imagesc?
조회 수: 5 (최근 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))
댓글 수: 0
채택된 답변
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))
You may also find this answer helpful: https://www.mathworks.com/matlabcentral/answers/97101-how-do-i-remove-the-border-lines-surrounding-an-axes
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

