Mercurial > hg > octave-jordi
changeset 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 | f065b24f792a |
children | 5502105b4f17 |
files | scripts/ChangeLog scripts/plot/print.m |
diffstat | 2 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2010-08-08 Ben Abbott <bpabbott@mac.com> + + * plot/print.m: Include 'colormap' when converting RGB to mono. + 2010-08-07 Ben Abbott <bpabbott@mac.com> * plot/__fltk_print__.m: When running pstoedit, crop eps file after it
--- a/scripts/plot/print.m +++ b/scripts/plot/print.m @@ -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