diff --git a/scripts/plot/private/__contour__.m b/scripts/plot/private/__contour__.m
--- a/scripts/plot/private/__contour__.m
+++ b/scripts/plot/private/__contour__.m
@@ -232,138 +232,111 @@
   endif
 
   if (strcmpi (filled, "on"))
+    fc = "flat";
+  else
+    fc = "none";
+  endif
+  
+  lvl_eps = get_lvl_eps (lev);
 
-    lvl_eps = get_lvl_eps (lev);
+  ## Decode contourc output format.
+  i1 = 1;
+  ncont = 0;
+  while (i1 < columns (c))
+    ncont++;
+    cont_lev(ncont) = c(1, i1);
+    cont_len(ncont) = c(2, i1);
+    cont_idx(ncont) = i1+1;
 
-    ## Decode contourc output format.
-    i1 = 1;
-    ncont = 0;
-    while (i1 < columns (c))
-      ncont++;
-      cont_lev(ncont) = c(1, i1);
-      cont_len(ncont) = c(2, i1);
-      cont_idx(ncont) = i1+1;
+    ii = i1+1:i1+cont_len(ncont);
+    cur_cont = c(:, ii);
+    startidx = ii(1);
+    stopidx = ii(end);
+    cont_area(ncont) = polyarea (c(1, ii), c(2, ii));
+    i1 += c(2, i1) + 1;
+  endwhile
 
-      ii = i1+1:i1+cont_len(ncont);
-      cur_cont = c(:, ii);
-      startidx = ii(1);
-      stopidx = ii(end);
-      cont_area(ncont) = polyarea (c(1, ii), c(2, ii));
-      i1 += c(2, i1) + 1;
-    endwhile
-
-    ## Handle for each level the case where we have (a) hole(s) in a patch.
-    ## Those are to be filled with the color of level below or with the
-    ## background colour.
-    for k = 1:numel (lev)
-      lvl_idx = find (abs (cont_lev - lev(k)) < lvl_eps);
-      len = numel (lvl_idx);
-      if (len > 1)
-        ## mark = logical(zeros(size(lvl_idx)));
-        mark = false (size (lvl_idx));
-        a = 1;
-        while (a < len)
-          ## take 1st patch
-          b = a + 1;
-          pa_idx = lvl_idx(a);
-          ## get pointer to contour start, and contour length
-          curr_ct_idx = cont_idx(pa_idx);
-          curr_ct_len = cont_len(pa_idx);
-          ## get contour
-          curr_ct = c(:, curr_ct_idx:curr_ct_idx+curr_ct_len-1);
-          b_vec = (a+1):len;
-          next_ct_pt_vec = c(:, cont_idx(lvl_idx(b_vec)));
-          in = inpolygon (next_ct_pt_vec(1,:), next_ct_pt_vec(2,:),
-                          curr_ct(1, :), curr_ct(2, :));
-          mark(b_vec(in)) = !mark(b_vec(in));
-          a++;
-        endwhile
-        if (numel (mark) > 0)
-          ## All marked contours describe a hole in a larger contour of
-          ## the same level and must be filled with colour of level below.
-          ma_idx = lvl_idx(mark);
-          if (k > 1)
-            ## Find color of level below.
-            tmp = find(abs(cont_lev - lev(k - 1)) < lvl_eps);
-            lvl_bel_idx = tmp(1);
-            ## Set color of patches found.
-            cont_lev(ma_idx) = cont_lev(lvl_bel_idx);
-          else
-            ## Set lowest level contour to NaN.
-            cont_lev(ma_idx) = NaN;
-          endif
+  ## Handle for each level the case where we have (a) hole(s) in a patch.
+  ## Those are to be filled with the color of level below or with the
+  ## background colour.
+  for k = 1:numel (lev)
+    lvl_idx = find (abs (cont_lev - lev(k)) < lvl_eps);
+    len = numel (lvl_idx);
+    if (len > 1)
+      ## mark = logical(zeros(size(lvl_idx)));
+      mark = false (size (lvl_idx));
+      a = 1;
+      while (a < len)
+        ## take 1st patch
+        b = a + 1;
+        pa_idx = lvl_idx(a);
+        ## get pointer to contour start, and contour length
+        curr_ct_idx = cont_idx(pa_idx);
+        curr_ct_len = cont_len(pa_idx);
+        ## get contour
+        curr_ct = c(:, curr_ct_idx:curr_ct_idx+curr_ct_len-1);
+        b_vec = (a+1):len;
+        next_ct_pt_vec = c(:, cont_idx(lvl_idx(b_vec)));
+        in = inpolygon (next_ct_pt_vec(1,:), next_ct_pt_vec(2,:),
+                        curr_ct(1, :), curr_ct(2, :));
+        mark(b_vec(in)) = !mark(b_vec(in));
+        a++;
+      endwhile
+      if (numel (mark) > 0)
+        ## All marked contours describe a hole in a larger contour of
+        ## the same level and must be filled with colour of level below.
+        ma_idx = lvl_idx(mark);
+        if (k > 1)
+          ## Find color of level below.
+          tmp = find(abs(cont_lev - lev(k - 1)) < lvl_eps);
+          lvl_bel_idx = tmp(1);
+          ## Set color of patches found.
+          cont_lev(ma_idx) = cont_lev(lvl_bel_idx);
+        else
+          ## Set lowest level contour to NaN.
+          cont_lev(ma_idx) = NaN;
         endif
       endif
-    endfor
+    endif
+  endfor
 
-    ## The algorithm can create patches with the size of the plotting
-    ## area, we would like to draw only the patch with the highest level.
-    del_idx = [];
-    max_idx = find (cont_area == max (cont_area));
-    if (numel (max_idx) > 1)
-      ## delete double entries
-      del_idx = max_idx(1:end-1);
-      cont_area(del_idx) = cont_lev(del_idx) = [];
-      cont_len(del_idx) = cont_idx(del_idx) = [];
+  ## The algorithm can create patches with the size of the plotting
+  ## area, we would like to draw only the patch with the highest level.
+  del_idx = [];
+  max_idx = find (cont_area == max (cont_area));
+  if (numel (max_idx) > 1)
+    ## delete double entries
+    del_idx = max_idx(1:end-1);
+    cont_area(del_idx) = cont_lev(del_idx) = [];
+    cont_len(del_idx) = cont_idx(del_idx) = [];
+  endif
+
+  ## Now we have everything together and can start plotting the patches
+  ## beginning with largest area.
+  [tmp, svec] = sort (cont_area);
+  len = ncont - numel (del_idx);
+  h = [];
+  for n = len:(-1):1
+    idx = svec(n);
+    ctmp = c(:, cont_idx(idx):cont_idx(idx) + cont_len(idx) - 1);
+    if (all (ctmp(:,1) == ctmp(:,end)))
+      ctmp(:, end) = [];
+    else
+      ## Special case unclosed contours
     endif
+    
+    h = [h; patch(ctmp(1, :), ctmp(2, :), cont_lev(idx), 
+                  "facecolor", fc, "edgecolor", lc, 
+                  "linestyle", ls, "linewidth", lw, "parent", hg)];
+  endfor
 
-    ## Now we have everything together and can start plotting the patches
-    ## beginning with largest area.
-    [tmp, svec] = sort (cont_area);
-    len = ncont - numel (del_idx);
-    h = [];
-    for n = len:(-1):1
-      idx = svec(n);
-      ctmp = c(:, cont_idx(idx):cont_idx(idx) + cont_len(idx) - 1);
-      if (all (ctmp(:,1) == ctmp(:,end)))
-        ctmp(:, end) = [];
-      else
-        ## Special case unclosed contours
-      endif
-      h = [h; patch(ctmp(1, :), ctmp(2, :), cont_lev(idx), "edgecolor", lc, 
-                    "linestyle", ls, "linewidth", lw, "parent", hg)];
-    endfor
+  if (min (lev) == max (lev))
+    set (gca (), "clim", [min(lev)-1, max(lev)+1]);
+  else
+    set (gca(), "clim", [min(lev), max(lev)]);
+  endif
 
-    if (min (lev) == max (lev))
-      set (gca (), "clim", [min(lev)-1, max(lev)+1]);
-    else
-      set (gca(), "clim", [min(lev), max(lev)]);
-    endif
-
-    set (gca (), "layer", "top");
-  else
-    ## Decode contourc output format.
-    i1 = 1;
-    h = [];
-    while (i1 < length (c))
-      clev = c(1,i1);
-      clen = c(2,i1);
-
-      if (all (c(:,i1+1) == c(:,i1+clen)))
-        p = c(:, i1+1:i1+clen-1);
-      else
-        p = [c(:, i1+1:i1+clen), NaN(2, 1)];
-      endif
-
-      switch (zmode)
-        case "none"
-          h = [h; patch(p(1,:), p(2,:), "facecolor", "none", 
-                        "edgecolor", lc, "linestyle", ls, "linewidth", lw,
-                        "cdata", clev, "parent", hg)]; 
-        case "auto"
-          h = [h; patch(p(1,:), p(2,:), clev * ones (1, columns (p)),
-                        "facecolor", "none", "edgecolor", lc, 
-                        "linestyle", ls, "linewidth", lw, "cdata", clev, 
-                        "parent", hg)];
-        otherwise
-          h = [h; patch(p(1,:), p(2,:), z * ones (1, columns (p)),
-                        "facecolor", "none", "edgecolor", lc,
-                        "linestyle", ls, "linewidth", lw, "cdata", clev,
-                        "parent", hg)];
-      endswitch
-      i1 += clen+1;
-    endwhile
-  endif
+  set (gca (), "layer", "top");
 
 endfunction
 
