<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4611.1300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi All,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Could somebody verify for me that the
vtkXYPlotActor->SetPlotLabel(...) function works correctly.</FONT></DIV>
<DIV><FONT size=2>This is a snippet of code I am using.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>
myXYActor->AddInput(myDataSet);</FONT></DIV>
<DIV><FONT size=2> const char* myLabel = "blah"</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> int myCounter =
myXYActor->GetInputList()->GetNumberOfItems() - 1;</FONT></DIV>
<DIV><FONT size=2>
myXYActor->SetPlotLabel(myCounter,myLabel);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>When I follow this through with the debugger, the label will
not get set because</FONT></DIV>
<DIV><FONT size=2>it fails in vtkLegendBoxActor.cxx line 288
i.e.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> if ( i >= 0 && i <
this->NumberOfEntries )</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Now this only happens from the second time onwards. Initially
the this->NumberOfEntries return 50. This is</FONT></DIV>
<DIV><FONT size=2>set from the vtkXYActor constructor. However the second time I
follow through the code, the</FONT></DIV>
<DIV><FONT size=2>this->NumberOfEntries is 1 (which is of course
is correct) but does not allow me to set</FONT></DIV>
<DIV><FONT size=2>the label for the next curve i.e.. i == 1
this->NumberOfEntries == 1.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I assume that the order of which I am doing this is wrong.
Sometime the number of entries must be updated</FONT></DIV>
<DIV><FONT size=2>but when ? So when do I add the label for a particular
data set ?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Regards</FONT></DIV>
<DIV><FONT size=2>Simon</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>================================<BR>S.D.Bulman.<BR>Senior
Research Officer.<BR>University of Wales Swansea.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2><A
href="mailto:S.D.Bulman@swansea.ac.uk">S.D.Bulman@swansea.ac.uk</A></FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>(W) +44 (0)1792 513179<BR>(H) +44 (0)1792
511144<BR>================================<BR></FONT></DIV></BODY></HTML>