|
2 | 2 |
|
3 | 3 | function obj = updateData(obj, dataIndex) |
4 | 4 |
|
5 | | -%-update plot based on plot call class-% |
6 | 5 | try |
7 | | - switch lower(obj.State.Plot(dataIndex).Class) |
| 6 | + |
| 7 | + %-update plot based on TreatAs PlotOpts-% |
| 8 | + |
| 9 | + if ~strcmpi(obj.PlotOptions.TreatAs, '_') |
| 10 | + if strcmpi(obj.PlotOptions.TreatAs, 'pie3') |
| 11 | + updatePie3(obj, dataIndex); |
| 12 | + end |
| 13 | + |
| 14 | + %-update plot based on plot call class-% |
| 15 | + |
| 16 | + else |
8 | 17 |
|
9 | | - %--CORE PLOT OBJECTS--% |
10 | | - case 'image' |
11 | | - updateImage(obj, dataIndex); |
12 | | - case 'line' |
13 | | - updateLineseries(obj, dataIndex); |
14 | | - case 'categoricalhistogram' |
15 | | - updateCategoricalHistogram(obj, dataIndex); |
16 | | - case 'histogram' |
17 | | - if strcmpi(obj.State.Axis(dataIndex).Handle.Type, 'polaraxes') |
18 | | - updateHistogramPolar(obj, dataIndex); |
19 | | - else |
20 | | - updateHistogram(obj, dataIndex); |
21 | | - end |
22 | | - case 'histogram2' |
23 | | - updateHistogram2(obj, dataIndex); |
24 | | - case 'patch' |
25 | | - % check for histogram |
26 | | - if isHistogram(obj,dataIndex) |
27 | | - updateHistogram(obj,dataIndex); |
28 | | - else |
29 | | - updatePatch(obj, dataIndex); |
30 | | - end |
31 | | - case 'rectangle' |
32 | | - updateRectangle(obj,dataIndex); |
33 | | - case 'surface' |
34 | | - updateSurfaceplot(obj,dataIndex); |
35 | | - case 'functionsurface' |
36 | | - updateFunctionSurface(obj,dataIndex); |
37 | | - |
38 | | - %-GROUP PLOT OBJECTS-% |
39 | | - case 'area' |
40 | | - updateArea(obj, dataIndex); |
41 | | - case 'areaseries' |
42 | | - updateAreaseries(obj, dataIndex); |
43 | | - case 'bar' |
44 | | - updateBar(obj, dataIndex); |
45 | | - case 'barseries' |
46 | | - updateBarseries(obj, dataIndex); |
47 | | - case 'baseline' |
48 | | - updateBaseline(obj, dataIndex); |
49 | | - case {'contourgroup','contour'} |
50 | | - updateContourgroup(obj,dataIndex); |
51 | | - case 'errorbar' |
52 | | - updateErrorbar(obj,dataIndex); |
53 | | - case 'errorbarseries' |
54 | | - updateErrorbarseries(obj,dataIndex); |
55 | | - case 'lineseries' |
56 | | - updateLineseries(obj, dataIndex); |
57 | | - case 'quiver' |
58 | | - updateQuiver(obj, dataIndex); |
59 | | - case 'quivergroup' |
60 | | - updateQuivergroup(obj, dataIndex); |
61 | | - case 'scatter' |
62 | | - if strcmpi(obj.State.Axis(dataIndex).Handle.Type, 'polaraxes') |
63 | | - updateScatterPolar(obj, dataIndex); |
64 | | - else |
65 | | - updateScatter(obj, dataIndex); |
66 | | - end |
67 | | - case 'scattergroup' |
68 | | - updateScattergroup(obj, dataIndex); |
69 | | - case 'stair' |
70 | | - updateStair(obj, dataIndex); |
71 | | - case 'stairseries' |
72 | | - updateStairseries(obj, dataIndex); |
73 | | - case 'stem' |
74 | | - updateStem(obj, dataIndex); |
75 | | - case 'stemseries' |
76 | | - updateStemseries(obj, dataIndex); |
77 | | - case 'surfaceplot' |
78 | | - updateSurfaceplot(obj,dataIndex); |
79 | | - case 'implicitfunctionline' |
80 | | - updateLineseries(obj, dataIndex); |
81 | | - |
82 | | - %--Plotly supported MATLAB group plot objects--% |
83 | | - case {'hggroup','group'} |
84 | | - % check for boxplot |
85 | | - if isBoxplot(obj, dataIndex) |
86 | | - updateBoxplot(obj, dataIndex); |
87 | | - end |
| 18 | + switch lower(obj.State.Plot(dataIndex).Class) |
| 19 | + |
| 20 | + %--CORE PLOT OBJECTS--% |
| 21 | + case 'image' |
| 22 | + updateImage(obj, dataIndex); |
| 23 | + case 'line' |
| 24 | + updateLineseries(obj, dataIndex); |
| 25 | + case 'categoricalhistogram' |
| 26 | + updateCategoricalHistogram(obj, dataIndex); |
| 27 | + case 'histogram' |
| 28 | + if strcmpi(obj.State.Axis(dataIndex).Handle.Type, 'polaraxes') |
| 29 | + updateHistogramPolar(obj, dataIndex); |
| 30 | + else |
| 31 | + updateHistogram(obj, dataIndex); |
| 32 | + end |
| 33 | + case 'histogram2' |
| 34 | + updateHistogram2(obj, dataIndex); |
| 35 | + case 'patch' |
| 36 | + % check for histogram |
| 37 | + if isHistogram(obj,dataIndex) |
| 38 | + updateHistogram(obj,dataIndex); |
| 39 | + else |
| 40 | + updatePatch(obj, dataIndex); |
| 41 | + end |
| 42 | + case 'rectangle' |
| 43 | + updateRectangle(obj,dataIndex); |
| 44 | + case 'surface' |
| 45 | + updateSurfaceplot(obj,dataIndex); |
| 46 | + case 'functionsurface' |
| 47 | + updateFunctionSurface(obj,dataIndex); |
| 48 | + case 'implicitfunctionsurface' |
| 49 | + updateImplicitFunctionSurface(obj,dataIndex); |
| 50 | + |
| 51 | + %-GROUP PLOT OBJECTS-% |
| 52 | + case 'area' |
| 53 | + updateArea(obj, dataIndex); |
| 54 | + case 'areaseries' |
| 55 | + updateAreaseries(obj, dataIndex); |
| 56 | + case 'bar' |
| 57 | + updateBar(obj, dataIndex); |
| 58 | + case 'barseries' |
| 59 | + updateBarseries(obj, dataIndex); |
| 60 | + case 'baseline' |
| 61 | + updateBaseline(obj, dataIndex); |
| 62 | + case {'contourgroup','contour'} |
| 63 | + updateContourgroup(obj,dataIndex); |
| 64 | + case 'functioncontour' |
| 65 | + updateFunctionContour(obj,dataIndex); |
| 66 | + case 'errorbar' |
| 67 | + updateErrorbar(obj,dataIndex); |
| 68 | + case 'errorbarseries' |
| 69 | + updateErrorbarseries(obj,dataIndex); |
| 70 | + case 'lineseries' |
| 71 | + updateLineseries(obj, dataIndex); |
| 72 | + case 'quiver' |
| 73 | + updateQuiver(obj, dataIndex); |
| 74 | + case 'quivergroup' |
| 75 | + updateQuivergroup(obj, dataIndex); |
| 76 | + case 'scatter' |
| 77 | + if strcmpi(obj.State.Axis(dataIndex).Handle.Type, 'polaraxes') |
| 78 | + updateScatterPolar(obj, dataIndex); |
| 79 | + else |
| 80 | + updateScatter(obj, dataIndex); |
| 81 | + end |
| 82 | + case 'scattergroup' |
| 83 | + updateScattergroup(obj, dataIndex); |
| 84 | + case 'stair' |
| 85 | + updateStair(obj, dataIndex); |
| 86 | + case 'stairseries' |
| 87 | + updateStairseries(obj, dataIndex); |
| 88 | + case 'stem' |
| 89 | + updateStem(obj, dataIndex); |
| 90 | + case 'stemseries' |
| 91 | + updateStemseries(obj, dataIndex); |
| 92 | + case 'surfaceplot' |
| 93 | + updateSurfaceplot(obj,dataIndex); |
| 94 | + case 'implicitfunctionline' |
| 95 | + updateLineseries(obj, dataIndex); |
| 96 | + |
| 97 | + %--Plotly supported MATLAB group plot objects--% |
| 98 | + case {'hggroup','group'} |
| 99 | + % check for boxplot |
| 100 | + if isBoxplot(obj, dataIndex) |
| 101 | + updateBoxplot(obj, dataIndex); |
| 102 | + end |
| 103 | + end |
88 | 104 | end |
89 | 105 |
|
90 | 106 | catch exception |
|
0 commit comments