필터 지우기
필터 지우기

Need to line up two graphs on same plot

조회 수: 2 (최근 30일)
Benson
Benson 2013년 7월 11일
I am using
[AX,H1,H2] = plotyy(time,Y1,time,Y2);
The x-axis(time) are the same for both. The green and blue graphs in the image both end at the same point, but notice how the green graph starts earlier. I want to line both graphs up so that they have the same starting and ending points. For some of the other graphs I've made, it's done by default. I'm not sure what is different with this set of data...
Any help is appreciated. Thanks! :)

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 7월 11일
Maybe your data contains Nan values?
  댓글 수: 6
Benson
Benson 2013년 7월 11일
편집: Azzi Abdelmalek 2013년 7월 11일
Interesting, the axes are lined up the way I want it to be.
Benson
Benson 2013년 7월 11일
편집: Benson 2013년 7월 11일
So by trial and error, I found that this line is causing the shift. axis([13 21-Inf Inf]);

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by