diff scripts/plot/print.m @ 10866:045558999570

print.m: Include 'colormap' when converting RGB to mono.
author Ben Abbott <bpabbott@mac.com>
date Sun, 08 Aug 2010 14:49:49 -0400
parents 3a5f5c99cc39
children dd6b90f44ae5
line wrap: on
line diff
--- a/scripts/plot/print.m	Sun Aug 08 06:01:42 2010 +0300
+++ b/scripts/plot/print.m	Sun Aug 08 14:49:49 2010 -0400
@@ -292,7 +292,7 @@
     endif
 
     if (opts.use_color < 0)
-      color_props = {"color", "facecolor", "edgecolor"};
+      color_props = {"color", "facecolor", "edgecolor", "colormap"};
       for c = 1:numel(color_props)
         h = findobj (opts.figure, "-property", color_props{c});
         hnone = findobj (opts.figure, color_props{c}, "none");
@@ -304,9 +304,11 @@
           props(m+n).name = color_props{c};
           props(m+n).value = {get(h(n), color_props{c})};
           xfer = repmat ([0.30, 0.59, 0.11], size (rgb, 1), 1);
-          ## convert RGB color to RGB gray scale
-          ggg = repmat (sum (xfer .* rgb, 2), 1, 3);
-          set (h(n), color_props{c}, ggg)
+          if (isnumeric (rgb))
+            ## convert RGB color to RGB gray scale
+            ggg = repmat (sum (xfer .* rgb, 2), 1, 3);
+            set (h(n), color_props{c}, ggg)
+          endif
         endfor
       endfor
     endif