Hey all,
i am trying to set the Label Format to only int, not scientific notation like shown in the attached picture:
I tried:
cube_axes_actor.SetXLabelFormat("%-#5d")
but this doesnt change anything.
Does anyone has any idea how to do this? (I am working with vtk 9 in a python environment)
BR
Hello, Bastian,
I think you should try the following methods:
The Set[X|Y|Z]LabelFormat()
methods are used to set the format of the numbers printed along the axes, not their titles.
take care,
Paulo
1 Like
self.axesActor = vtk.vtkCubeAxesActor()
self.axesActor.ZAxisTickVisibilityOn()
self.axesActor.SetXTitle('EASTING')
self.axesActor.SetXUnits('m')
self.axesActor.SetYTitle('Depth')
self.axesActor.SetYUnits('m')
self.axesActor.SetBounds([-1,1,-1*float(self.shcut04_03.currentText()),1*float(self.shcut04_03.currentText()),-1,1])
self.axesActor.SetXAxisRange(1000000, 3000000) # USER OVERIDE
self.axesActor.SetYAxisRange(-1200, 400)
self.axesActor.SetLabelScaling(0, 0, 0, 0)
self.axesActor.SetXLabelFormat("%.0f")
self.axesActor.SetYLabelFormat("%.0f")
self.axesActor.SetCamera(self.ren.GetActiveCamera())
self.ren.AddActor(self.axesActor)