Legend of a plot out of table first row
1 view (last 30 days)
Show older comments
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 Comments
Riccardo Scorretti
on 10 May 2022
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.
Accepted Answer
Voss
on 11 May 2022
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 Comments
More Answers (0)
See Also
Categories
Find more on Legend in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!