octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49022] "demo light 11" results in gnuplot err


From: Rik
Subject: [Octave-bug-tracker] [bug #49022] "demo light 11" results in gnuplot errors
Date: Wed, 14 Sep 2016 18:45:04 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #3, bug #49022 (project octave):

The problem seems to be that color has one entry rather than 3.  I can trace
this back to 


              if ((strcmp (ec, "flat") || strcmp (ec, "interp"))
                  && isfield (obj, "cdata"))
                if (ndims (obj.cdata) == 2
                    && (columns (obj.cdata) == nc
                        && (rows (obj.cdata) == 1
                            || rows (obj.cdata) == 3)))
                  ccol = cdat(:, i);
                elseif (ndims (obj.cdata) == 2
                        && (rows (obj.cdata) == nc
                            && (columns (obj.cdata) == 1
                                || columns (obj.cdata) == 3)))
                  ccol = cdat(i, :);
                elseif (ndims (obj.cdata) == 3)
                  ccol = permute (cdat (:, i, :), [1, 3, 2]);
                else
                  ccol = cdat;
                endif


It seems that cdat is 3xN so that the line picked out is 


                  ccol = cdat(:, i);


But that makes ccol a 3x1 vector, rather than a 1x3 vector which is the usual.
 If I add a transpose 


                  ccol = cdat(:, i).';


then I get a 1x3 vector, but some of the values are negative.  So, whatever
cdata is getting produced, it is not RGB.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49022>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]