✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Scatter_matrix how to modify axis title size for all subplots


I want to modify the size of axis titles for scatter_matrix plot since it’s all scrambled together. My scatter_matrix has 4 variables. I tried use fig.update_layout(title={"font": {"size": 8}}), it only changes the first axis.

Then I tried

fig = px.scatter_matrix(df)
fig.update_traces(marker={"size": 4,"opacity":0.7})
fig.for_each_xaxis(lambda axis: axis.update(title={
                         "font": {"size": 8}}))

This also change the first xaxis
I also tried

fig['layout']['xaxis2']['title']['font']['size'] = 8

It doesn’t recognize xaxis2 at all. Please suggest on how to change the font size for all axis titles. Thank you