forked from plotly/plotly_matlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdateErrorbarseries.m
More file actions
74 lines (49 loc) · 2.15 KB
/
updateErrorbarseries.m
File metadata and controls
74 lines (49 loc) · 2.15 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
function obj = updateErrorbarseries(obj, errorbarIndex)
% type: ...[DONE]
% symmetric: ...[DONE]
% array: ...[DONE]
% value: ...[NA]
% arrayminus: ...{DONE]
% valueminus: ...[NA]
% color: ...[DONE]
% thickness: ...[DONE]
% width: ...[DONE]
% opacity: ---[TODO]
% visible: ...[DONE]
%-------------------------------------------------------------------------%
%-ERRORBAR STRUCTURE-%
errorbar_data = get(obj.State.Plot(errorbarIndex).Handle);
%-ERRORBAR CHILDREN-%
errorbar_child = get(obj.State.Plot(errorbarIndex).Handle,'Children');
%-ERROR BAR LINE CHILD-%
errorbar_line_child_data = get(errorbar_child(2));
%-------------------------------------------------------------------------%
%-UPDATE LINESERIES-%
updateLineseries(obj, errorbarIndex);
%-------------------------------------------------------------------------%
%-errorbar visible-%
obj.data{errorbarIndex}.error_y.visible = true;
%-------------------------------------------------------------------------%
%-errorbar type-%
obj.data{errorbarIndex}.error_y.type = 'data';
%-------------------------------------------------------------------------%
%-errorbar symmetry-%
obj.data{errorbarIndex}.error_y.symmetric = false;
%-------------------------------------------------------------------------%
%-errorbar value-%
obj.data{errorbarIndex}.error_y.array = errorbar_data.UData;
%-------------------------------------------------------------------------%
%-errorbar valueminus-%
obj.data{errorbarIndex}.error_y.arrayminus = errorbar_data.LData;
%-------------------------------------------------------------------------%
%-errorbar thickness-%
obj.data{errorbarIndex}.error_y.thickness = errorbar_line_child_data.LineWidth;
%-------------------------------------------------------------------------%
%-errorbar width-%
obj.data{errorbarIndex}.error_y.width = obj.PlotlyDefaults.ErrorbarWidth;
%-------------------------------------------------------------------------%
%-errorbar color-%
col = 255*errorbar_line_child_data.Color;
obj.data{errorbarIndex}.error_y.color = ['rgb(' num2str(col(1)) ',' num2str(col(2)) ',' num2str(col(3)) ')'];
%-------------------------------------------------------------------------%
end