# Changing visibility of 3D Cube and 3D Axis Label through Python

**URL:** <https://discourse.slicer.org/t/changing-visibility-of-3d-cube-and-3d-axis-label-through-python/3650>\
**Category:** Development\
**Tags:** python\
**Created:** [August 3, 2018, 9:50pm UTC](https://discourse.slicer.org/t/changing-visibility-of-3d-cube-and-3d-axis-label-through-python/3650 "2018-08-03T21:50:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brynpitt](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@brynpitt](https://discourse.slicer.org/u/brynpitt)\
**Post date:** [August 3, 2018, 9:50pm UTC](https://discourse.slicer.org/t/changing-visibility-of-3d-cube-and-3d-axis-label-through-python/3650/1 "2018-08-03T21:50:33Z")

</div>

Hello all,

I am trying to change the visibility of the 3D Cube and the 3D Axis Labels (in the 3D View) using Python. I want to do this because I am trying to customize the appearance of the main window at launch.

I have been able to find find functions to set all the other aspects of the appearance through slicer.util and slicer.app, but I haven’t found the way to change things inside the view windows themselves. If someone could point me in the right direction, I would really appreciate it.

Thanks,  
Bryn

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 3, 2018, 11:41pm UTC](https://discourse.slicer.org/t/changing-visibility-of-3d-cube-and-3d-axis-label-through-python/3650/2 "2018-08-03T23:41:17Z")

</div>

These view properties are stored in the view node. See [this example](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Change_3D_view_background_color) of how to modify a property.

---

<div class="post-metadata">

**Author:** ![hemmer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hemmer/32/9028_2.png) [@hemmer](https://discourse.slicer.org/u/hemmer)\
**Post date:** [May 7, 2025, 3:09pm UTC](https://discourse.slicer.org/t/changing-visibility-of-3d-cube-and-3d-axis-label-through-python/3650/3 "2025-05-07T15:09:58Z")

</div>

As the link went dead, and just for reference, I achieved this by:

```auto
layoutManager = slicer.app.layoutManager()
threeDWidget = layoutManager.threeDWidget(0)
threeDView = threeDWidget.threeDView()
threeDView.mrmlViewNode().SetAxisLabelsVisible(False)
threeDView.mrmlViewNode().SetBoxVisible(False)

```
