Create a square loglog subplot

조회 수: 5 (최근 30일)
clement casotti
clement casotti 2021년 9월 1일
편집: Matt J 2021년 9월 1일
Hello all
I want to create a plot of 6 subplot logarithm. so far so good.
The problem is that I would like to create "square" log figures like on picture 1 except that matlab displays rectangular subplots by and automatically adapts the height/width ratio according to the size of the general plot.

답변 (1개)

Matt J
Matt J 2021년 9월 1일
  댓글 수: 4
clement casotti
clement casotti 2021년 9월 1일
subplot(3,2,1)
set(gcf, 'Position', [120, 80, 1600, 900])
hold on
scatter(data(position1:position2,1),data(position1:position2,2),'o','b','filled')
scatter(data(position1:position2,1),data(position1:position2,3),'o','b')
scatter(data(position1:position2,1),data(position1:position2,4),'s','r')
scatter(data(position1:position2,5),data(position1:position2,6),'x','g')
axis square
grid on
set(gca,'xscale','log')
set(gca,'yscale','log')
legend('Symetrique','AC','BC','Gerber')
titre=strcat('Sondage géoélectrique de 2002 numéro:',int2str(nom));
title(titre)
hold off
subplot(3,2,2)
[...]
Matt J
Matt J 2021년 9월 1일
편집: Matt J 2021년 9월 1일
Because your subplot array is taller than it is wide, you must make your figure window taller than wide as well, e.g.,
figure(1)
for i=1:6
subplot(3,2,i)
plot(rand(1,5)); axis square
end
h=figure(1);
h.Position(3:4)=[640,950];
Otherwise, there is a tighter limit on how large the square tiles can grow.
figure(2);
for i=1:6
subplot(3,2,i)
plot(rand(1,5)); axis square
end
h=figure(2);
h.Position(3:4)=[950,640];

댓글을 달려면 로그인하십시오.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by