Legend of a plot out of table first row
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi
I have the attached table. I Plot in a for loop an want as a legend the first row of the table.
Can someone help me ?
Thanks
댓글 수: 2
Riccardo Scorretti
2022년 5월 10일
Your question is too vague: the table reads:
load Test_Table.mat
Test_Table
What do you want to plot? Post the data, and a simple example of what you would like to obtain.
채택된 답변
Voss
2022년 5월 11일
I'm not sure where the legends are supposed to fit, but here you go:
S = load('PegelpunktetimeseriesneuCopy');
PegelpunktetimeseriesneuCopy = S.PegelpunktetimeseriesneuCopy;
ModellD_BHQ = PegelpunktetimeseriesneuCopy(1:3:end, :);
ModellD_HQ5000 = PegelpunktetimeseriesneuCopy(2:3:end, :);
ModellD_HQ10000 = PegelpunktetimeseriesneuCopy(3:3:end, :);
ax = [ ...
subplot(3,1,1) ...
subplot(3,1,2) ...
subplot(3,1,3) ...
];
title(ax(1),'BHQ')
title(ax(2),'HQ5000')
title(ax(3),'HQ10000')
hold(ax,'on')
grid(ax,'on')
xlabel(ax,'Zeit [h]')
ylabel(ax,'WSPL [m]')
h = [ ...
plot(ax(1),ModellD_BHQ{29:39,2:end}.') ...
plot(ax(2),ModellD_HQ5000{29:39,2:end}.') ...
plot(ax(3),ModellD_HQ10000{29:39,2:end}.') ...
];
leg = [ ...
legend(h(:,1),ModellD_BHQ{29:39,1}) ...
legend(h(:,2),ModellD_HQ5000{29:39,1}) ...
legend(h(:,3),ModellD_HQ10000{29:39,1}) ...
];
set(leg,'Interpreter','none','Location','EastOutside');
sgtitle('WSPL zeitlicher Verlauf Modell D Pegelpunkte FKM 113')
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!