This project is read-only.
1
Vote

output of fill() is different in Octave

description

We have to adjust @tseries/mybarcon.m in case of Octave.
The thing is that Octave's fill assigns one handle to all polygons plotted. Even if you plotted several polygons they are all treated as one.

I did adjustment this way:
--- /tmp/thg.1QW1Iq/iris_clone.11/classlib/@tseries/mybarcon.m
+++ /tmp/thg.1QW1Iq/iris_clone.11.992/classlib/@tseries/mybarcon.m
@@ -99,10 +99,21 @@
 % Plot bars for one series and all periods at once.
 H = [];
 for j = 1 : nData
-    if j == 2
-        set(Ax,'nextPlot','add');
+    if true % ##### MOSW
+        if j == 2
+            set(Ax,'nextPlot','add');
+        end
+        H = [H,fill(xx,yy(:,:,j),Colors(j,:))]; %#ok<AGROW>
+    else
+        Hk = zeros(size(xx,2),1);
+        for k = 1 : size(xx,2)
+            if k == 2
+                set(Ax,'nextPlot','add');
+            end
+            Hk(k) = fill(xx(:,k),yy(:,k,j),Colors(j,:));
+        end
+        H = [H,Hk];
     end
-    H = [H,fill(xx,yy(:,:,j),Colors(j,:))]; %#ok<AGROW>
 end
 
 % Make all bar clusters invisible except the first period with all non-zero
This is known Octave bug.

comments