Search code examples
vtk

VTK: small cosy in a corner instead of the middle


Is it possible to have the vtkAxesActor small in a corner of the window?

enter image description here

Here is a image of what I currently got and what I would like to have. The colorful axes are the standard axesActor. But I would like the axes in a corner of the window and only there (bottom left in black). They shouldn't move around the window when the view is rotated. Only around their origin.

Is this possible? And if yes, how?


Solution

  • A possible solution is to put the vtkAxesActor into an orientation widget:

        widget = vtk.vtkOrientationMarkerWidget()
        widget.SetOrientationMarker(axisActor)
        widget.SetInteractor(interactor)
        widget.SetViewport(0, 0, size, size)
        widget.InteractiveOff()
        widget.EnabledOn()