MATLAB: Legend is not working! legend I think I have a simple problme. I have 4 plots in my code as you can see, however, it seems that Legend does not recognize my last plot. Best Answer plot(I,repmat(12,1,numel(I)),'-rx')plot(repmat(0.1,1,numel(V3)),V3,'-bo') Related SolutionsMATLAB: Does anybody know how to include a legend in a figure of three functions with different colours or patterns doc legendplot(t,x1,'r'); hold on; % One 'hold on' is enoughplot(t,x2,b--o'); plot(t,x3,g--');legend('Function-1', 'Function-2', 'Function-3')... same for other figures as well.You can use this form as well:h1(1) = plot(t,x1,'r', 'displayName', 'Function-1'); hold on; % One 'hold on' is enoughh(2) = plot(t,x2,b--o', 'displayName', 'Function-1'); h(3) = plot(t,x3,g--', 'displayName', 'Function-1');legend(h) MATLAB: Errorbar: Thicker line but same error bar width Just plot a thicker line on top: hold on plot(x, jobsInSystem, '-k.', 'LineWidth', 2) Related QuestionErrorbar + multiple plots + one legendPlotting a Legend on a GraphPlotting two legends on the same plotCombining two strings
Best Answer