|
1 |
| -function obj = updateErrorbar(obj, plotIndex) |
2 |
| - %-INITIALIZATION-% |
3 |
| - |
| 1 | +function data = updateErrorbar(obj, plotIndex) |
4 | 2 | %-get data structures-%
|
5 | 3 | plotData = obj.State.Plot(plotIndex).Handle;
|
6 | 4 |
|
7 |
| - %-get error data-% |
8 |
| - yPositiveDelta = plotData.YPositiveDelta; |
9 |
| - yNegativeDelta = plotData.YNegativeDelta; |
10 |
| - |
11 |
| - xPositiveDelta = plotData.XPositiveDelta; |
12 |
| - xNegativeDelta = plotData.XNegativeDelta; |
13 |
| - |
14 | 5 | %-set trace-%
|
15 |
| - obj.data{plotIndex} = updateLineseries(obj, plotIndex); |
16 |
| - |
17 |
| - obj.data{plotIndex}.error_y.visible = true; |
18 |
| - obj.data{plotIndex}.error_x.visible = true; |
19 |
| - obj.data{plotIndex}.error_y.type = 'data'; |
20 |
| - obj.data{plotIndex}.error_x.type = 'data'; |
21 |
| - |
22 |
| - obj.data{plotIndex}.error_y.symmetric = false; |
23 |
| - |
24 |
| - obj.data{plotIndex}.error_y.array = yPositiveDelta; |
25 |
| - obj.data{plotIndex}.error_x.array = xPositiveDelta; |
26 |
| - obj.data{plotIndex}.error_x.arrayminus = xNegativeDelta; |
27 |
| - obj.data{plotIndex}.error_y.arrayminus = yNegativeDelta; |
28 |
| - |
29 |
| - obj.data{plotIndex}.error_y.thickness = plotData.LineWidth; |
30 |
| - obj.data{plotIndex}.error_x.thickness = plotData.LineWidth; |
31 |
| - |
32 |
| - obj.data{plotIndex}.error_y.width = obj.PlotlyDefaults.ErrorbarWidth; |
33 |
| - obj.data{plotIndex}.error_x.width = obj.PlotlyDefaults.ErrorbarWidth; |
34 |
| - |
35 |
| - %-errorbar color-% |
36 |
| - errorColor = getStringColor(round(255*plotData.Color)); |
37 |
| - obj.data{plotIndex}.error_y.color = errorColor; |
38 |
| - obj.data{plotIndex}.error_x.color = errorColor; |
| 6 | + data = updateLineseries(obj, plotIndex); |
| 7 | + |
| 8 | + data.error_y = struct( ... |
| 9 | + "visible", true, ... |
| 10 | + "type", "data", ... |
| 11 | + "array", plotData.YPositiveDelta, ... |
| 12 | + "arrayminus", plotData.YNegativeDelta, ... |
| 13 | + "thickness", plotData.LineWidth, ... |
| 14 | + "width", obj.PlotlyDefaults.ErrorbarWidth, ... |
| 15 | + "color", getStringColor(round(255*plotData.Color)), ... |
| 16 | + "symmetric", false ... |
| 17 | + ); |
| 18 | + |
| 19 | + data.error_x = struct( ... |
| 20 | + "visible", true, ... |
| 21 | + "type", "data", ... |
| 22 | + "array", plotData.XPositiveDelta, ... |
| 23 | + "arrayminus", plotData.XNegativeDelta, ... |
| 24 | + "thickness", plotData.LineWidth, ... |
| 25 | + "width", obj.PlotlyDefaults.ErrorbarWidth, ... |
| 26 | + "color", getStringColor(round(255*plotData.Color)) ... |
| 27 | + ); |
39 | 28 | end
|
0 commit comments