Effacer les filtres
Effacer les filtres

How i can show correlation plot in subplot?

1 vue (au cours des 30 derniers jours)
Mahboubeh Molavi-Arabshahi
Commenté : Image Analyst le 14 Mar 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
  1 commentaire
Image Analyst
Image Analyst le 14 Mar 2022
What is the variable you want plotted? Did you try passing it to plot()?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by