Black Lives Matter. Please consider donating to Black Girls Code today.

Axis equal error in 3D after update to 4.2.1 in Python with Dash

I recently updated plotly Python, and my plot does not scale the z axis equally anymore I would do this by running

        self._layout = go.Layout(autosize=True,
                                 height=800)
        self._layout.scene = dict(
            aspectmode="data",
            aspectratio={'x': 1, 'y': 1, 'z': 1},
        )

and would then plot a sphere with:

        u1 = np.linspace(0, 2 * np.pi, num)
        v1 = np.linspace(0, np.pi, 240)
        uu, vv = np.meshgrid(u1, v1)

        xx = x + radius * np.cos(uu) * np.sin(vv)
        yy = y + radius * np.sin(uu) * np.sin(vv)
        zz = z + radius * np.cos(vv)

        sphere = go.Surface(
            x=xx, y=yy, z=zz
        )

However, now the z component of the sphere is not axis equal.