MATLAB: Deleting legends from subplot

figurelegendMATLAB

I have many figures. Each figure have 2 graphs. I want to delete legends in 2 graphs.

Best Answer

Look at this exampe
subplot(1,2,1);
plot(1:10)
legend('aa')
subplot(1,2,2);
plot(sin(1:10))
legend('bb')
%---delete the legend-------------
s=findobj('type','legend')
delete(s)