|
2 | 2 |
|
3 | 3 | function obj = updateData(obj, dataIndex) |
4 | 4 |
|
5 | | -try |
6 | | - |
7 | 5 | %-update plot based on TreatAs PlotOpts-% |
8 | 6 |
|
9 | 7 | if ismember('pie3', lower(obj.PlotOptions.TreatAs)) |
|
174 | 172 | if isBoxplot(obj, dataIndex) |
175 | 173 | updateBoxplot(obj, dataIndex); |
176 | 174 | end |
| 175 | + otherwise |
| 176 | + error('Non-supported plot: %s',lower(obj.State.Plot(dataIndex).Class)); |
177 | 177 | end |
178 | 178 | end |
179 | | - |
180 | | -catch exception |
181 | | - if obj.UserData.Verbose |
182 | | - fprintf([exception.message '\nWe had trouble parsing the ' obj.State.Plot(dataIndex).Class ' object.\n',... |
183 | | - 'This trace might not render properly.\n\n']); |
184 | | - end |
185 | | -end |
186 | 179 |
|
187 | 180 | %------------------------AXIS/DATA CLEAN UP-------------------------------% |
188 | 181 |
|
189 | | -try |
| 182 | +ax = obj.State.Plot(dataIndex).AssociatedAxis; |
| 183 | +if ~ismember(ax.Type,specialAxisPlots()) |
190 | 184 | %-AXIS INDEX-% |
191 | 185 | axIndex = obj.getAxisIndex(obj.State.Plot(dataIndex).AssociatedAxis); |
192 | 186 |
|
|
206 | 200 |
|
207 | 201 | % check for xaxis categories |
208 | 202 | if strcmpi(xaxis.type, 'category') && ... |
209 | | - ~strcmp(obj.data{dataIndex}.type,'box') |
| 203 | + ~any(strcmp(obj.data{dataIndex}.type,{'heatmap' 'box'})) |
210 | 204 | obj.data{dataIndex}.x = obj.State.Plot(dataIndex).AssociatedAxis.XTickLabel; |
211 | 205 | eval(['obj.layout.xaxis' num2str(xsource) '.autotick=true;']); |
212 | 206 | end |
|
218 | 212 |
|
219 | 213 | % check for yaxis categories |
220 | 214 | if strcmpi(yaxis.type, 'category') && ... |
221 | | - ~strcmp(obj.data{dataIndex}.type,'box') |
| 215 | + ~any(strcmp(obj.data{dataIndex}.type,{'heatmap' 'box'})) |
222 | 216 | obj.data{dataIndex}.y = obj.State.Plot(dataIndex).AssociatedAxis.YTickLabel; |
223 | 217 | eval(['obj.layout.yaxis' num2str(xsource) '.autotick=true;']); |
224 | 218 | end |
225 | | -catch |
226 | | - % TODO to the future |
227 | | - % disp('catch at line 157 in updateData.m file') |
228 | 219 | end |
229 | 220 |
|
230 | 221 | %-------------------------------------------------------------------------% |
|
0 commit comments