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

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

[Octave-bug-tracker] [bug #45593] Color problem with patch ()


From: Rik
Subject: [Octave-bug-tracker] [bug #45593] Color problem with patch ()
Date: Wed, 22 Jul 2015 20:54:13 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0

Update of bug #45593 (project octave):

                  Status:                    None => In Progress            

    _______________________________________________________

Follow-up Comment #6:

@Julien: This doesn't seem as bad as I first thought.  The problem is that the
'facecolor' attribute is being set to [0 0 0] (black).  If you change the
'facecolor' attribute to 'flat' the correct coloring is restored.

There are still a number of questions however.  The test script uses the
structure syntax for supplying the faces and vertices.


fv = [];
fv.vertices = coord;
fv.faces = connec;
fv.facecolor = 'flat';
fv.facevertexcdata = c;


I notice that you are trying to set the facecolor property inside the
structure.  That syntax isn't accepted according to the Matlab documentation,
but it might be undocumented behavior.


patch(FV) creates a patch using structure FV, which contains the fields
vertices, faces, and optionally facevertexcdata. These fields correspond to
the Vertices, Faces, and FaceVertexCData patch properties. Specifying only
unique vertices and their connection matrix can reduce the size of the data
for patches having many faces. For an example of how to specify patches with
this method, see Specifying Patch Object Shapes.


Here are a couple examples of syntax that works in Octave:


hp = patch (fv);
set (hp, 'facecolor', 'flat');

patch ('faces', connec, 'vertices', coord, 'facevertexcdata', c, 'facecolor',
'flat')

patch (fv, 'facecolor', 'flat')


Do you have access to Matlab?  I'd like to try and see what is going on here.


script_patch_problem

close all;
hp = patch ('faces', connec, 'vertices', coord);
get (hp, 'facecolor')

close all;
hp = patch ('faces', connec, 'vertices', coord, 'facevertexcdata', c);
get (hp, 'facecolor')

close all;
fv.facecolor = 'g';
hp = patch (fv);
get (hp, 'facecolor')





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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