Hello,
In my application, I use vtkCubeAxesActor2D
, which I configure this way (C++):
// add scaling to the edges of the cube.
_axes = vtkSmartPointer<vtkCubeAxesActor2D>::New();
_axes->SetViewProp( spectrogramActor.GetPointer() );
_axes->SetCamera( _renderer->GetActiveCamera() );
_axes->SetLabelFormat("%6.4g");
_axes->SetFlyModeToClosestTriad();
_axes->ScalingOff();
_axes->SetNumberOfLabels( 5 );
_axes->SetZLabel("Feature Size");
_axes->SetAxisTitleTextProperty( tprop.GetPointer() );
_axes->SetAxisLabelTextProperty( tprop.GetPointer() );
You may notice the ScalingOff()
method but it doesn’t do what you need . I belive the trick is to try
vtkCubeAxesActor2D
instead of vtkCubeAxesActor
.
best,
PC