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!