[vtkusers] Graph vertex coloring not working

Jeff Baumes jeff.baumes at kitware.com
Wed Mar 31 11:35:59 EDT 2010


Yes, that was wrong. Fixed now:

/cvsroot/VTK/VTK/Views/vtkGraphLayoutView.h,v  <--  Views/vtkGraphLayoutView.h
new revision: 1.42; previous revision: 1.41

Jeff

On Wed, Mar 31, 2010 at 10:45 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Wed, Mar 31, 2010 at 10:38 AM, Jeff Baumes <jeff.baumes at kitware.com> wrote:
>> You need to specify the array to color by with
>>
>>  graphLayoutView->SetVertexColorArrayName("color");
>>
>> The default is to color by vertex degree, which is why there were two
>> of each color (degree 1 and 2).
>>
>> Jeff
>
> That did the trick - it is working now.
>
> Jeff, so is the documentation wrong?:
>
> void vtkGraphLayoutView::SetVertexColorArrayName(const char *   name)
> The array to use for coloring vertices. Default is "color".
>
> Should it read:
>
> void vtkGraphLayoutView::SetVertexColorArrayName(const char *   name)
> The array to use for coloring vertices. If this function has not been
> called, the vertices are colored by degree.
>
> ?
>
> Thanks for your help,
>
> David
>



More information about the vtkusers mailing list