`mlab.orientation_axes` - Cannot set different properties for each individual axis
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 316
- Avg merge
- 7h 44m
- Merged PRs (30d)
- 5
Description
### Issue description
Currently, MayaVI handles the three different captions as the same entity, which prevents setting their properties individually. This portion of code causes the issue:
https://github.com/enthought/mayavi/blob/226189a6ad3dc3c01d031ef21d0d0cde554ac851/mayavi/modules/orientation_axes.py#L159-L162
### How to reproduce?
Execute the following:
```python
from mayavi import mlab
#Display something..
mlab.points3d([0], [0], [0])
#Add an orientation axes
orientation_axes = mlab.orientation_axes()
orientation_axes.marker.interactive = False
orientation_axes.marker.set_viewport(0.0, 0.0, 0.5, 0.5)
orientation_axes.axes.normalized_label_position = [1.5, 1.5, 1.5]
#Setup color for each axis
orientation_axes.axes.x_axis_caption_actor2d.caption_text_property.color = (1, 0, 0)
orientation_axes.axes.y_axis_caption_actor2d.caption_text_property.color = (0, 1, 0)
orientation_axes.axes.z_axis_caption_actor2d.caption_text_property.color = (0, 0, 1)
mlab.show()
```
Expected:

Actual:

### Suggested solution
- Provide a flag such as `uniform_update` to update all properties uniformly at once (`uniform_update=True` by default for backwards compatibility)
- Store the full list of `caption_text_property` for the thee axes, and iterate over them to update, given that `uniform_update` is set
- If `uniform_update` is unset, `text_property` should not be accessible, and instead a list of `text_properties` shall be provided (e.g. `orientation_axes.text_properties[0].color` for the color of x axis). Alternatively, three separated attributes `*_axis_text_property` can be provided.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.