# How to change axis title in multiple 3d subplots?

**URL:** <https://community.plotly.com/t/how-to-change-axis-title-in-multiple-3d-subplots/55661>\
**Category:** 📊 Plotly Python\
**Created:** [August 18, 2021, 6:11pm UTC](https://community.plotly.com/t/how-to-change-axis-title-in-multiple-3d-subplots/55661 "2021-08-18T18:11:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NicoliHc](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@NicoliHc](https://community.plotly.com/u/NicoliHc)\
**Post date:** [August 18, 2021, 6:11pm UTC](https://community.plotly.com/t/how-to-change-axis-title-in-multiple-3d-subplots/55661/1 "2021-08-18T18:11:36Z")

</div>

Hello, I’m new to plotly so I apologize if this is an obvious question.  
I’m trying to rename my axis in two 3D subplots. I want them to share the title of the Y-axis and X-axis but not the Z-axis. I tried to use

```auto
fig.update_layout(scene=dict(
            xaxis_title='X AXIS TITLE',
            yaxis_title='Y AXIS TITLE',
            zaxis_title='Z AXIS TITLE'))

```

but only worked for one subplot.  
I also tried to use  
`fig.update_xaxes(title_text="xaxis 1 title", row=1, col=1)`  
but nothing changed.  
Here is a print of how it’s right now and the code that I’m using

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/c/7/c78f2b334aa57785e4d4f10f059b6ec3d420a17f.png)

OBS: I’m using a pyqt window to display my plots

```auto
fig = make_subplots(rows=1, cols=2, specs=[[{'type': 'surface'}, {'type': 'surface'}]], subplot_titles=("Amplitude Entalhe - Solda", "Amplitude Reatância Indutiva Entalhe - Solda"))
        #X Gv [dB], y Rot [º], z2 |dAmpXL/AmpXLf| [%], z1 |dAmp/Ampf| [%]
        xx1, yy1, zz1 = getcoordinates('primeiroteste_difAmpZ.txt')
        xx2, yy2, zz2 = getcoordinates('primeiroteste_difAmpXl.txt')
        fig.add_trace(go.Surface(x=xx1, y=yy1, z=zz1, colorscale="Jet"), row=1, col=1)
        fig.add_trace(go.Surface(x=xx2, y=yy2, z=zz2, colorscale="Jet"), row=1, col=2)
        fig.update_layout(scene=dict(
            xaxis_title='X AXIS TITLE',
            yaxis_title='Y AXIS TITLE',
            zaxis_title='Z AXIS TITLE'))

```

---

<div class="post-metadata">

**Author:** ![NicoliHc](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@NicoliHc](https://community.plotly.com/u/NicoliHc)\
**Post date:** [August 20, 2021, 1:12am UTC](https://community.plotly.com/t/how-to-change-axis-title-in-multiple-3d-subplots/55661/2 "2021-08-20T01:12:57Z")

</div>

I figured it out! What I needed to do was to add a parameter scene2 like this:

```auto
fig.update_layout(scene=dict(
            xaxis_title='X AXIS TITLE',
            yaxis_title='Y AXIS TITLE',
            zaxis_title='Z AXIS TITLE'),
                          scene2=dict(
            xaxis_title='X AXIS TITLE',
            yaxis_title='Y AXIS TITLE',
            zaxis_title='Z AXIS TITLE'))

```

---

<div class="post-metadata">

**Author:** ![46319943](https://avatars.discourse-cdn.com/v4/letter/4/d07c76/32.png) [@46319943](https://community.plotly.com/u/46319943)\
**Post date:** [January 2, 2023, 11:41am UTC](https://community.plotly.com/t/how-to-change-axis-title-in-multiple-3d-subplots/55661/3 "2023-01-02T11:41:14Z")

</div>

Can also use `fig.update_scenes(scene, row=row_num, col=col_num)`

`update_layout` will overwrite the previous properties unexpectly even if the overwrite is set to Fasle. Maybe it’s the bug of plotly.
