필터 지우기
필터 지우기

How i can show correlation plot in subplot?

조회 수: 1 (최근 30일)
Mahboubeh Molavi-Arabshahi
Mahboubeh Molavi-Arabshahi 2022년 3월 14일
댓글: Image Analyst 2022년 3월 14일
This is my code, I want to have some correlation plot with subplot , is there anyone can help me?
how can I show the subplot
y = triu(repmat(n+1, n, n) - (1:n)') + 0.5;
x = triu(repmat(1:n, n, 1)) + 0.5;
x(x == 0.5) = NaN;
scatter(x(:), y(:), 400.*abs(C(:)), C(:), 'filled', 'MarkerFaceAlpha', 0.6)
% enclose markers in a grid
xl = [1:n+1;repmat(n+1, 1, n+1)];
xl = [xl(:, 1), xl(:, 1:end-1)];
yl = repmat(n+1:-1:1, 2, 1);
line(xl, yl, 'color', 'k') % horizontal lines
line(yl, xl, 'color', 'k') % vertical lines
% show labels
text(1:n, (n:-1:1) + 0.5, myLabel1, 'HorizontalAlignment', 'right')
text((1:n) + 0.5, repmat(n + 1, n, 1), myLabel1, 'HorizontalAlignment', 'right', 'Rotation', 270)
h = gca;
colorbar(h);
h.Visible = 'off';
h.Position(4) = h.Position(4)*0.9;
axis(h, 'equal')
colormap('jet')
% caxis([-1,1]);
title('Your Title', 'FontSize', 10); % set title

답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by