%% Modify Color Order for Specified Axes
% Create a tiled chart layout and plot three lines in the first tile.

tiledlayout('flow')
nexttile
plot([1 2 3; 4 5 6],'LineWidth',2)

%
% Call the nexttile function with a return argument to get the axes object for the second tile. Plot three lines in the second tile. Then get the color order matrix for the axes and return the output in C. Change the first color in C to purple, and set the axes color order to the modified C matrix.

ax = nexttile;
plot(ax,[4 5 6; 1 2 3],'LineWidth',2)
C = colororder(ax);
C(1,:) = [0.5 0 1];
colororder(ax,C)

% Copyright 2019 The MathWorks, Inc.