|
1 |
| -function obj = updateHistogramPolar(obj,histIndex) |
| 1 | +function data = updateHistogramPolar(obj,histIndex) |
2 | 2 | % x:...[DONE]
|
3 | 3 | % y:...[DONE]
|
4 | 4 | % histnorm:...[DONE]
|
|
45 | 45 | % outliercolor: ...[NA]
|
46 | 46 | % outlierwidth: ...[NA]
|
47 | 47 |
|
48 |
| - %-HIST DATA STRUCTURE- % |
49 | 48 | hist_data = obj.State.Plot(histIndex).Handle;
|
50 | 49 |
|
51 |
| - %-barpolar type-% |
52 |
| - obj.data{histIndex}.type = 'barpolar'; |
| 50 | + data.type = "barpolar"; |
53 | 51 |
|
54 |
| - %-barpolar data-% |
55 | 52 | binedges = rad2deg(hist_data.BinEdges);
|
56 |
| - obj.data{histIndex}.theta = binedges(1:end-1) + 0.5*diff(binedges); |
57 |
| - obj.data{histIndex}.width = diff(binedges); |
58 |
| - obj.data{histIndex}.r = double(hist_data.BinCounts); |
| 53 | + data.theta = binedges(1:end-1) + 0.5*diff(binedges); |
| 54 | + data.width = diff(binedges); |
| 55 | + data.r = double(hist_data.BinCounts); |
59 | 56 |
|
60 |
| - obj.data{histIndex}.name = hist_data.DisplayName; |
61 |
| - obj.layout.barmode = 'group'; |
62 |
| - obj.data{histIndex}.marker.line.width = hist_data.LineWidth; |
| 57 | + data.name = hist_data.DisplayName; |
| 58 | + obj.layout.barmode = "group"; |
| 59 | + data.marker.line.width = hist_data.LineWidth; |
63 | 60 |
|
64 |
| - %-hist opacity-% |
65 | 61 | if ~ischar(hist_data.FaceAlpha)
|
66 |
| - obj.data{histIndex}.opacity = hist_data.FaceAlpha; |
| 62 | + data.opacity = hist_data.FaceAlpha; |
67 | 63 | end
|
68 | 64 |
|
69 |
| - obj.data{histIndex}.marker = extractPatchFace(hist_data); |
70 |
| - obj.data{histIndex}.visible = strcmp(hist_data.Visible,'on'); |
| 65 | + data.marker = extractPatchFace(hist_data); |
| 66 | + data.visible = hist_data.Visible == "on"; |
71 | 67 |
|
72 |
| - %-hist showlegend-% |
73 |
| - leg = hist_data.Annotation; |
74 |
| - legInfo = leg.LegendInformation; |
75 |
| - |
76 |
| - switch legInfo.IconDisplayStyle |
77 |
| - case 'on' |
78 |
| - showleg = true; |
79 |
| - case 'off' |
80 |
| - showleg = false; |
| 68 | + switch hist_data.Annotation.LegendInformation.IconDisplayStyle |
| 69 | + case "on" |
| 70 | + data.showlegend = true; |
| 71 | + case "off" |
| 72 | + data.showlegend = false; |
81 | 73 | end
|
82 |
| - |
83 |
| - obj.data{histIndex}.showlegend = showleg; |
84 | 74 | end
|
0 commit comments