drawing two different graphs on the same figure
조회 수: 1 (최근 30일)
이전 댓글 표시
I want to draw two plots on the same graph. The first graph has 1279 rows which are dislayed in the graph in the following manner:
figure()
x = liamu(:,2);
y = col1iamu(:,1);
plot(x,y);
on the same figure then I want to draw a second graph with 1432 rows (the rows sometimes vary) and the x axis should be numbers cumulative integers (1,2,3,4,5,6... and so on corresponding to the individual row, ie row 1 has x axis 1, row 2 has x axis 2 and so on up until 1432. I want this second graph to be displayed in red.
thanks a lot
댓글 수: 0
답변 (1개)
KSSV
2017년 10월 13일
figure
hold on
plot(x1,y1,'b') ; % first graph plot with blue color
plot(x2,y2,'r') ; % sedond graph plot with blue color
댓글 수: 3
참고 항목
카테고리
Help Center 및 File Exchange에서 Discrete Data Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!