Can I label all similar colored lines in one figure with subplots?
3 views (last 30 days)
Show older comments
Hi everyone,
I would ilke to label the lines that are getting the data from the same column with a common name, rather than naming the lines per subplot.
In the following example, I would like, for examle, to give a common name to all yellow lines as 'yellow', rather than naming the yellow line on each subplot.
rng(1)
for i = 1:5
A{i} = randn(10,2);
end
for i = 1:5
B1(:,i) = [A{i}(:,1)];
B2(:,i) = [A{i}(:,2)];
end
figure;
subplot(2,2,1)
filename = plot(B1)
hold on
subplot(2,2,2)
filename = plot(B2)
hold on
0 Comments
Answers (0)
See Also
Categories
Find more on Subplots 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!