Skip to content

Commit

Permalink
Fixed bug in fetchColourByIdx
Browse files Browse the repository at this point in the history
  • Loading branch information
MarangoniCow committed Dec 9, 2022
1 parent 1fb911f commit b484ffc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion @PlotDefaults/fetchColourByIdx.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
if shade > M
error('Initial shade too large');
else
colidx = mod(idx - 1, N - 1) + 1;
colidx = mod(idx, N);
if colidx == 0
colidx = N;
end
colToReturn = PlotColours.colours.(colournames{colidx})(shade, :);

end
Expand Down

0 comments on commit b484ffc

Please sign in to comment.