import plotly.graph_objects as go
fig = go.Figure(data=go.Bar(x=['Label 1<br>Sub-label', 'Label 2<br>Sub-label', 'Label 3<br>Sub-label'], y=[10, 11, 12]))
fig.update_layout(
title='Multi-Line Axis Labels',
xaxis_title='X Axis Name',
yaxis_title='Y Axis Name'
)
fig.show()