how to specify length on subplot
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi guys
so i want to subplot a vector and matrix in the same figure using this code
subplot(2,1,1)
plot(data);
subplot(2,1,2)
contour(wt);
the plot is ike this
![untitled.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226302/untitled.jpeg)
the variable data (vector) length is 1600 and the variable wt(matrix) length is 1000
i want the subplot to be like this (the two variable have a same length,in this case i want the length to be 1000).
![Annotation 2019-06-25 225952.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226303/Annotation%202019-06-25%20225952.png)
how to do that?
thank youu very much
댓글 수: 0
채택된 답변
infinity
2019년 6월 25일
Hello,
You could set xlim of the first figure.
More details, you should see this
https://it.mathworks.com/help/matlab/ref/xlim.html
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!