|  | 
| 133 | 133 |         obj.data{contourIndex}.contours.coloring = 'fill'; | 
| 134 | 134 | end | 
| 135 | 135 | 
 | 
|  | 136 | +%-------------------------------------------------------------------------% | 
|  | 137 | + | 
|  | 138 | +%-contour levels-% | 
|  | 139 | +if length(contour_data.LevelList) > 1 | 
|  | 140 | +    cstart = contour_data.LevelList(1); | 
|  | 141 | +    cend = contour_data.LevelList(end); | 
|  | 142 | +    csize = mean(diff(contour_data.LevelList)); | 
|  | 143 | +else | 
|  | 144 | +    cstart = contour_data.LevelList(1) - 1e-3; | 
|  | 145 | +    cend = contour_data.LevelList(end) + 1e-3; | 
|  | 146 | +    csize = 2e-3; | 
|  | 147 | +end | 
|  | 148 | + | 
| 136 | 149 | %-start-% | 
| 137 |  | -obj.data{contourIndex}.contours.start = contour_data.LevelList(1); | 
|  | 150 | +obj.data{contourIndex}.contours.start = cstart; | 
| 138 | 151 | 
 | 
| 139 | 152 | %-end-% | 
| 140 |  | -obj.data{contourIndex}.contours.end = contour_data.LevelList(end); | 
|  | 153 | +obj.data{contourIndex}.contours.end = cend; | 
| 141 | 154 | 
 | 
| 142 | 155 | %-step-% | 
| 143 |  | -obj.data{contourIndex}.contours.size = contour_data.LevelStep; | 
|  | 156 | +obj.data{contourIndex}.contours.size = csize; | 
| 144 | 157 | 
 | 
| 145 | 158 | %-------------------------------------------------------------------------% | 
| 146 | 159 | 
 | 
|  | 
| 199 | 212 | 
 | 
| 200 | 213 | %-------------------------------------------------------------------------% | 
| 201 | 214 | 
 | 
|  | 215 | +%-axis layout-% | 
|  | 216 | +t = 'linear'; | 
|  | 217 | +eval(['obj.layout.xaxis' num2str(xsource) '.type=t;']); | 
|  | 218 | +eval(['obj.layout.xaxis' num2str(xsource) '.autorange=true;']); | 
|  | 219 | +eval(['obj.layout.xaxis' num2str(xsource) '.ticktext=axis_data.XTickLabel;']); | 
|  | 220 | +eval(['obj.layout.xaxis' num2str(xsource) '.tickvals=axis_data.XTick;']); | 
|  | 221 | + | 
|  | 222 | +eval(['obj.layout.yaxis' num2str(xsource) '.type=t;']); | 
|  | 223 | +eval(['obj.layout.yaxis' num2str(xsource) '.autorange=true;']); | 
|  | 224 | +eval(['obj.layout.yaxis' num2str(xsource) '.ticktext=axis_data.YTickLabel;']); | 
|  | 225 | +eval(['obj.layout.yaxis' num2str(xsource) '.tickvals=axis_data.YTick;']); | 
|  | 226 | + | 
|  | 227 | +%-------------------------------------------------------------------------% | 
|  | 228 | + | 
| 202 | 229 | end | 
0 commit comments