필터 지우기
필터 지우기

Problem with axes of plotyy in a loop

조회 수: 1 (최근 30일)
MichMichel
MichMichel 2015년 10월 23일
Hi :) I don't very like the plotyy function. It makes me crazy a lot ... My problem : I want to hold on different datas on 2 different axes on the same graph.
For exemple :
figure();
hH = []; hV = [];
for i = 1:3
hold on
y1 =rand(1,10);
y2 =rand(1,10)*1000;
t = 1:10;
[ax,hH(i),hV(i)] = plotyy(t,y1,t,y2)
hold off
end
set(ax(1),'Ylim',[0 1],'Ytick',[0:0.025:1]);
set(ax(2),'Ylim',[0 1000],'Ytick',[0:250:1000]);
If i don't set the two axes is ok ! but i want to arrange the Ytick and there are two problems : -1) Tick of the axe Y1 is on the Y2 axe -2) There are overlaps of numbers on the Y2 axe.
I know that there are a lot of same topics on the web but it's not working in my case in a loop
If you have any ideas :) Thanks a lot !

답변 (0개)

카테고리

Help CenterFile Exchange에서 Two y-axis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by