-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
287420b
commit f9fb4e9
Showing
21 changed files
with
54,236 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
modules/graphics/functions/private/getColorAndUpdateIndex.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
%============================================================================= | ||
% Copyright (c) 2016-present Allan CORNET (Nelson) | ||
%============================================================================= | ||
% This file is part of the Nelson. | ||
%============================================================================= | ||
% LICENCE_BLOCK_BEGIN | ||
% SPDX-License-Identifier: LGPL-3.0-or-later | ||
% LICENCE_BLOCK_END | ||
%============================================================================= | ||
function color = getColorAndUpdateIndex(go) | ||
colorOrder = go.ColorOrder; | ||
if isempty (colorOrder) | ||
color = [0 0 0]; | ||
return; | ||
end | ||
colorIndex = go.ColorOrderIndex; | ||
nbColors = size (colorOrder, 1); | ||
colorIndex = mod (colorIndex, nbColors); | ||
if (colorIndex == 0) | ||
colorIndex = nbColors; | ||
elseif (colorIndex < 0) | ||
colorIndex = 1; | ||
end | ||
color = colorOrder(colorIndex, :); | ||
if (colorIndex >= nbColors) | ||
colorIndex = colorIndex + 1; | ||
colorIndex = mod (colorIndex, nbColors); | ||
if (colorIndex == 0) | ||
colorIndex = 1; | ||
end | ||
lineStyleOrderIndex = go.LineStyleOrderIndex; | ||
go.LineStyleOrderIndex = lineStyleOrderIndex + 1; | ||
else | ||
colorIndex = colorIndex + 1; | ||
end | ||
go.ColorOrderIndex = colorIndex; | ||
end | ||
%============================================================================= | ||
|
13 changes: 13 additions & 0 deletions
13
modules/graphics/functions/private/getColorShortNameList.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
%============================================================================= | ||
% Copyright (c) 2016-present Allan CORNET (Nelson) | ||
%============================================================================= | ||
% This file is part of the Nelson. | ||
%============================================================================= | ||
% LICENCE_BLOCK_BEGIN | ||
% SPDX-License-Identifier: LGPL-3.0-or-later | ||
% LICENCE_BLOCK_END | ||
%============================================================================= | ||
function l = getColorShortNameList() | ||
l = {'y','m','c','r','g','b','w','k'}; | ||
end | ||
%============================================================================= |
30 changes: 30 additions & 0 deletions
30
modules/graphics/functions/private/getLineStyleAndUpdateIndex.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
%============================================================================= | ||
% Copyright (c) 2016-present Allan CORNET (Nelson) | ||
%============================================================================= | ||
% This file is part of the Nelson. | ||
%============================================================================= | ||
% LICENCE_BLOCK_BEGIN | ||
% SPDX-License-Identifier: LGPL-3.0-or-later | ||
% LICENCE_BLOCK_END | ||
%============================================================================= | ||
function lineStyle = getLineStyleAndUpdateIndex(go) | ||
lineStyleOrder = go.LineStyleOrder; | ||
if isempty (lineStyleOrder) | ||
lineStyle = '-'; | ||
return; | ||
end | ||
if ischar(lineStyleOrder) | ||
lineStyleOrder = cellstr(lineStyleOrder); | ||
end | ||
LineStyleOrderIndex = go.LineStyleOrderIndex; | ||
numberOfStyles = size(lineStyleOrder, 1); | ||
LineStyleOrderIndex = mod (LineStyleOrderIndex, numberOfStyles); | ||
if (LineStyleOrderIndex == 0) | ||
LineStyleOrderIndex = numberOfStyles; | ||
elseif (LineStyleOrderIndex < 0) | ||
LineStyleOrderIndex = 1; | ||
end | ||
lineStyle = lineStyleOrder{LineStyleOrderIndex}; | ||
end | ||
%============================================================================= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
%============================================================================= | ||
% Copyright (c) 2016-present Allan CORNET (Nelson) | ||
%============================================================================= | ||
% This file is part of the Nelson. | ||
%============================================================================= | ||
% LICENCE_BLOCK_BEGIN | ||
% SPDX-License-Identifier: LGPL-3.0-or-later | ||
% LICENCE_BLOCK_END | ||
%============================================================================= | ||
function l = getMarkerNameList() | ||
l = {'+','o','*','.','x','square','s','diamond','d','^','v','>','<', 'pentagram', 'p', 'hexagram', 'h'}; | ||
end | ||
%============================================================================= |
Oops, something went wrong.