# control "axes grid" properties using python script

**URL:** https://discourse.paraview.org/t/control-axes-grid-properties-using-python-script/15879
**Category:** ParaView Support
**Created:** [December 18, 2024, 7:27am UTC](https://discourse.paraview.org/t/control-axes-grid-properties-using-python-script/15879 "2024-12-18T07:27:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Chen\_Huang](https://discourse.paraview.org/user_avatar/discourse.paraview.org/chen_huang/32/15690_2.png) [@Chen\_Huang](https://discourse.paraview.org/u/Chen_Huang)
#### Post date: [December 18, 2024, 7:27am UTC](https://discourse.paraview.org/t/control-axes-grid-properties-using-python-script/15879/1 "2024-12-18T07:27:22Z")

</div>

Hi, I want to modify “axes grid” properties using python script. It seems that some scripts are working, but some are not working.  
For example: the following is working:

```auto
>>> renderView = GetActiveView()
>>> axesGrid = renderView.AxesGrid
>>> axesGrid.Visibility = 1 #show the axes grid
>>> axesGrid.XTitle = 'R (m)' #change the title
>>> axesGrid.XTitleColor = [0, 0, 0.0] #change the color

```

But some are not working, e.g.

```auto
>>> axesGrid.XAxisLabels = [0.2, 0.3, 0.4] #change the labels

```

Moreover, I also want to change the color of the lables, and could not find the command. I also want to turn off some lables on some boundaries. Such function is achievable via GUI, but I don’t know how to do it in command line. Any idea? Thanks!  
Chen

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [December 23, 2024, 2:04pm UTC](https://discourse.paraview.org/t/control-axes-grid-properties-using-python-script/15879/2 "2024-12-23T14:04:04Z")

</div>

Hi,

You need to set `XAxisUseCustomLabels=1` so your `XAxisLabels` will be taken into account.

For coloration, see the `XLabelColor` property.

As a more general advise, to find the Python API you can use the Python Trace (`Tools / Start Trace`), with `Fully Trace Supplemental Proxies` turned On.

---

<div class="post-metadata">

### Author: ![Chen\_Huang](https://discourse.paraview.org/user_avatar/discourse.paraview.org/chen_huang/32/15690_2.png) [@Chen\_Huang](https://discourse.paraview.org/u/Chen_Huang)
#### Post date: [January 8, 2025, 11:58am UTC](https://discourse.paraview.org/t/control-axes-grid-properties-using-python-script/15879/3 "2025-01-08T11:58:53Z")

</div>

Thanks Nicolas for the clarification. I can control the axis properties with the help of trace tool with fully trace turned on.
