For 'plot' function it is possible to 'merge' legends by integrating into a vector:
a = plot(rand(4));hold onb = plot(rand(4));legend([a; b], {'a', 'b', 'c', 'd', 'a2', 'b2', 'c2', 'd2'});
But for errorbar plots it doesn work:
a = errorbar(rand(4),rand(4));hold onb = errorbar(rand(4),rand(4));legend([a; b], {'a', 'b', 'c', 'd', 'a2', 'b2', 'c2', 'd2'});
How come and what to do about it?
Best Answer