changeset 21806:43980d664e2d

Convert RGB triad to 24-bit integer for patch edgecolor processing (bug #47974) * __gnuplot_draw_axes__.m: Check if color data is three columns wide. If so, use line color specification 'rgb variable' and convert color data to a single column of 8-bit components packed in 24-bits.
author Daniel J Sebald <daniel.sebald@ieee.org>
date Thu, 02 Jun 2016 09:39:51 -0500
parents adf3473323a7
children 1955af16b42e
files scripts/plot/util/private/__gnuplot_draw_axes__.m
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m	Thu Jun 02 09:50:29 2016 -0700
+++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m	Thu Jun 02 09:39:51 2016 -0500
@@ -894,7 +894,12 @@
            endif
 
            if (ischar (color))
-             colorspec = "palette";
+             if (columns (ccol) == 1)
+               colorspec = "palette";
+             elseif (columns (ccol) == 3)
+               colorspec = "lc rgb variable";
+               ccol = 255*ccol*[0x1; 0x100; 0x10000];
+             endif
            else
              colorspec = sprintf ("lc rgb \"#%02x%02x%02x\"",
                                   round (255*color));