Borrar filtros
Borrar filtros

How i can show correlation plot in subplot?

1 visualización (últimos 30 días)
Mahboubeh Molavi-Arabshahi
Mahboubeh Molavi-Arabshahi el 14 de Mzo. de 2022
Comentada: Image Analyst el 14 de Mzo. de 2022
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

Respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by