[vtkusers] XY Plotting (the plot labels)

Simon Bulman S.D.Bulman at swansea.ac.uk
Wed May 23 05:40:29 EDT 2001

Hi All,

Could somebody verify for me that the vtkXYPlotActor->SetPlotLabel(...) function works correctly.
This is a snippet of code I am using.

    const char* myLabel = "blah"

    int myCounter = myXYActor->GetInputList()->GetNumberOfItems() - 1;

When I follow this through with the debugger, the label will not get set because
it fails  in vtkLegendBoxActor.cxx line 288 i.e.

    if ( i >= 0 && i < this->NumberOfEntries )

Now this only happens from the second time onwards. Initially the this->NumberOfEntries return 50. This is
set from the vtkXYActor constructor. However the second time I follow through the code, the
this->NumberOfEntries is 1 (which is of course is correct) but does not allow me to set
the label for the next curve i.e.. i == 1 this->NumberOfEntries == 1.

I assume that the order of which I am doing this is wrong. Sometime the number of entries must be updated
but when ? So when do I add the label for a particular data set ?


Senior Research Officer.
University of Wales Swansea.

S.D.Bulman at swansea.ac.uk

(W) +44 (0)1792 513179
(H)  +44 (0)1792 511144

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20010523/1536b5dd/attachment.htm>

More information about the vtkusers mailing list