changeset 23543:2fd1745398e3

Implement colormap for axes objects in gnuplot (bug #48667). * __gnuplot_draw_axes__.m: Get colormap from axis, rather than parent figure.
author Daniel J Sebald <daniel.sebald@ieee.org>
date Mon, 29 May 2017 17:06:31 -0700
parents 0e4ceda8fbcf
children 7f2fc79d07ad
files scripts/plot/util/private/__gnuplot_draw_axes__.m
diffstat 1 files changed, 1 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m	Tue May 30 12:49:44 2017 -0400
+++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m	Mon May 29 17:06:31 2017 -0700
@@ -465,21 +465,12 @@
   endif
 
   if (rows (parent_figure_obj.colormap) != 2)
-    ## Second pass to change color map for binary images (not sure correct)
     kids1 = kids;
     while (! isempty (kids1))
       obj = get (kids1(end));
       kids1 = kids1(1:(end-1));
 
       switch (obj.type)
-        case {"image"}
-          if (isfield (obj, "cdata") && islogical (obj.cdata))
-            parent_figure_obj.colormap = [0 0 0; 1 1 1];
-            axis_obj.clim = [0 1];
-            axis_obj.climmode = "manual";
-            break;
-          endif
-
         case "hggroup"
           ## Push group children into the kid list.
           if (isempty (kids1))
@@ -491,7 +482,7 @@
     endwhile
   endif
 
-  cmap = parent_figure_obj.colormap;
+  cmap = axis_obj.colormap;
   cmap_sz = rows (cmap);
   addedcmap = [];