-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathplotset.m
46 lines (38 loc) · 972 Bytes
/
plotset.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
classdef plotset < optset
% PLOTSET is plot settings class.
%
% See also optset.
% This file is a part of the CMToolkit.
% It is licensed under the BSD 3-clause license.
% (See LICENSE.)
% Copyright Toby Driscoll, 2014.
% Written by Everett Kropf, 2014.
properties
lineWidth
lineColor
lineSmoothing
gridColor
end
properties(Access=protected)
proplist = { ...
'lineWidth', 0.5, @isnumeric, '[ double {0.5} ]'
'lineColor', cmtplot.black, [], '[ valid colorspec ]'
'lineSmoothing', 'on', ...
@plotset.isOnOff, '[ {on} | off ]'
'gridColor', cmtplot.grey, [], '[ valid colorspec ]'
}
end
methods
function opt = plotset(varargin)
opt = opt@optset(varargin{:});
end
function opt = set.lineSmoothing(opt, value)
opt.lineSmoothing = lower(value);
end
end
methods(Static, Hidden)
function tf = isOnOff(s)
tf = any(strcmpi(s, {'on', 'off'}));
end
end
end