3D Surface Subplot Axis Titles Not Working

I have the following (simplified) code to generate a set of 3D axis subplots, but the axis labeling does not seem to be working. Any thoughts? I’ve looked here and here, but neither suggestions seem to be working.

import pandas as pd
import numpy as np

class minimal_options_example_object:
    def __init__(self):
        self.n0 = 100
        self.n1 = 100

class minimal_grid_example_object:
    def __init__(self,options):
        self.x = {}
        self.x[0],self.x[1] = np.meshgrid(np.linspace(0,1,options.n0),np.linspace(0,1,options.n1))

class minimal_model_example_object:
    def __init__(self):
        self.endog = ['q','psi','mue','sigqk','sigqs']
        self.options = options()
        self.grid = grid(options)
        self.state = ['e','z']
        self.secondaryplot = ['var1','var2']

m = minimal_model_example_object()
df = pd.DataFrame(np.random.random((m.options.n0*m.options.n1,7)),columns=m.endog+m.secondaryplot)

def plot(m,df,use_dash=True):
    """
    some plotting
    """
    
    nrow = int(np.floor(np.sqrt(len(m.endog))))
    ncol = int(np.ceil(len(m.endog)/nrow))
    nplots = int(nrow*ncol)
    fig = make_subplots(rows=nrow,cols=ncol,specs=[[{'type':'surface'} for i in range(ncol)] for j in range(nrow)],subplot_titles=m.endog)
    row = 1
    col = 1
    traces = []
    for var in m.endog:
        t = go.Surface(x=m.grid.x[0],y=m.grid.x[1],z=df[var].to_numpy().reshape([m.options.n0,m.options.n1],order='F'),colorscale='Viridis',name=var)
        traces.append(t)
        fig.add_trace(t,row=row,col=col)
        fig.update_xaxes(title_text=m.state[0], row=row, col=col)
        fig.update_yaxes(title_text=m.state[1], row=row, col=col)
        if col == ncol:
            col = 1
            row += 1
        else:
            col += 1
    fig.update_layout(height=500*nrow, width=500*ncol, title_text="Endogenous Variables",title_x=0.5,title_font_size=24)
    fig.update_traces(showscale=False)
    if not use_dash:
        fig.show()
    
    fig2 = {}
    if len(m.secondaryplot)>0:
        nrow = int(np.floor(np.sqrt(len(m.secondaryplot))))
        ncol = int(np.ceil(len(m.secondaryplot)/nrow))
        nplots = int(nrow*ncol)
        fig2 = make_subplots(rows=nrow,cols=ncol,specs=[[{'type':'surface'} for i in range(ncol)] for j in range(nrow)],subplot_titles=m.secondaryplot)
        row = 1
        col = 1
        traces2 = []
        for var in m.secondaryplot:
            t = go.Surface(x=m.grid.x[0],y=m.grid.x[1],z=df[var].to_numpy().reshape([m.options.n0,m.options.n1],order='F'),colorscale='Viridis',name=var)
            fig2.add_trace(t,row=row,col=col)
            fig.update_xaxes(title_text=m.state[0], row=row, col=col)
            fig.update_yaxes(title_text=m.state[1], row=row, col=col)
            if col == ncol:
                col = 0
                row += 1
            else:
                col += 1
        fig2.update_layout(height=400*nrow, width=400*ncol, title_text="Secondary Variables",title_x=0.5,title_font_size=24)
        if not use_dash:
            fig2.show()
    if use_dash:
        return [fig,fig2]

Here’s what the top three plots look like (the axes titles are identically the defaults for all subplots):