[vtkusers] 2DAxisActor
Sander Niemeijer
niemeijer at science-and-technology.nl
Wed May 19 13:06:40 EDT 2004
On woensdag, mei 19, 2004, at 16:08 Europe/Amsterdam, Louis Desjardins
wrote:
> Thanks Cedric for your response,
>
> Does this mean that people do not use vtkAxisActor2D?
>
> Then how do I get ticks and labels on my axes?
>
> Thanks again,
>
> Louis
>
>> Hi vtkusers
>> i just want to display an xy axis on my screen so i have an object of
>> vtk2DAxisActor :
>>
>> XYAxisActor->SetPoint1(10, 100);
>> XYAxisActor->SetPoint2(10, 100);
>> XYAxisActor->SetRange(5, 40);
>> XYAxisActor->AxisVisibilityOn();
>> XYAxisActor->TickVisibilityOn();
>> XYAxisActor->LabelVisibilityOn();
>> XYAxisActor->RenderOverlay( Ren1 );
>>
>> and then I add this actor to my Renderer but nothign appears?
>> Do you see anything wrong with the above code?
>> Thanks
Try using different coordinates for Point2 and Point1. You are now
creating an Axis of zero length.
According to the latest VTK documentation you should also be using the
SetPosition and SetPosition2 functions from vtkActor2D as the
vtk2DAxisActor::SetPoint functions seem to be only there for backward
compatibility.
Best regards,
Sander
More information about the vtkusers
mailing list