Axis labels on scatter_matrix

Yes, you can alter any property on the axes, but unfortunately you can’t use update_xaxes() in this case, as the axes are implicitly created in the Javascript layer, so you’ll need to enumerate the axes you’re targeting for update:

import plotly.express as px

fig = px.scatter_matrix(px.data.tips())
fig.update_layout({"xaxis"+str(i+1): dict(tickangle = -45) for i in range(7)})
fig.show()
1 Like