# CubeAxesActor Label Format

**URL:** https://discourse.vtk.org/t/cubeaxesactor-label-format/7097
**Category:** Support
**Created:** [November 7, 2021, 11:00am UTC](https://discourse.vtk.org/t/cubeaxesactor-label-format/7097 "2021-11-07T11:00:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![BastianJuelich](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@BastianJuelich](https://discourse.vtk.org/u/BastianJuelich)
#### Post date: [November 7, 2021, 11:00am UTC](https://discourse.vtk.org/t/cubeaxesactor-label-format/7097/1 "2021-11-07T11:00:40Z")

</div>

Hey all,

i am trying to set the Label Format to only int, not scientific notation like shown in the attached picture:  
 ![vtk_caa](https://discourse.vtk.org/uploads/default/original/2X/e/ee51b018a906df797352c242971011a61de52394.png)

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

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [November 8, 2021, 1:39pm UTC](https://discourse.vtk.org/t/cubeaxesactor-label-format/7097/2 "2021-11-08T13:39:41Z")

</div>

Hello, Bastian,

I think you should try the following methods:

- Set the axes titles via the `Set[X|Y|Z]Title(const char *)` methods: [https://vtk.org/doc/nightly/html/classvtkCubeAxesActor.html#a6d332cc9baf966006a75e98412ef2fc6](https://vtk.org/doc/nightly/html/classvtkCubeAxesActor.html#a6d332cc9baf966006a75e98412ef2fc6)
- Configure the axes text styles via the `vtkTextProperty` objects ([https://vtk.org/doc/nightly/html/classvtkTextProperty.html](https://vtk.org/doc/nightly/html/classvtkTextProperty.html)) returned by `GetTitleTextProperty(int)`: [https://vtk.org/doc/nightly/html/classvtkCubeAxesActor.html#a9df1f33ea6d388aaf8125fa769d87e2f](https://vtk.org/doc/nightly/html/classvtkCubeAxesActor.html#a9df1f33ea6d388aaf8125fa769d87e2f)

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

---

<div class="post-metadata">

### Author: ![Agus\_Abdullah](https://discourse.vtk.org/user_avatar/discourse.vtk.org/agus_abdullah/32/4735_2.png) [@Agus\_Abdullah](https://discourse.vtk.org/u/Agus_Abdullah)
#### Post date: [February 23, 2022, 10:28am UTC](https://discourse.vtk.org/t/cubeaxesactor-label-format/7097/3 "2022-02-23T10:28:58Z")

</div>

```
    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)
```
