"Nezbytným krokem k tomu, abyste od života získali věci, po kterých toužíte, je rozhodnout se, co vlastně chcete."
plot % obycejny stem % peaky stairs % schody
set(gcf,'Name','NAZEV') set(gcf, 'MenuBar', 'none'); set(gcf, 'ToolBar', 'none');
x = 1:100;
len = 10;
cc=hsv(len);
for k=0:len-1
plot(x(k*len:(k+1),'color',cc(k+1,:));
end
Umístění tak, aby nekryla data:
legend('Location','bestoutside')
(lze taky 'best', ale není to moc spolehlivé), vypnutí rámečku a transparentní pozadí zajistí:
legend boxoff
years = [2003:2013]; cc=hsv(length(years)); for year=years plot(year, rand(), 'x', 'color',cc(year-2002,:)) hold on, grid on end legend(cellstr(num2str(years')))
% append legend h = get(gcf,'Children'); legends = h(1).String; legend(gca,[legends 'ADDED_LEGEND_TEXT '])
set(0, 'defaultTextInterpreter', 'latex');
set(0, 'defaultTextInterpreter', 'none');
Funkce:
linkaxes
Viz Synchronize limits of specified 2-D axes - MATLAB linkaxes.
.