Reduce decimal places in Plotly histnorm

I am trying to reduce the decimal places to 2 in this plot:

Here is the code:

fig = px.histogram(df10, x=“S_Hour”, histnorm=‘percent’, text_auto=True, labels=dict(S_Hour=‘Hours of the Day’))
fig.update_layout(yaxis_title=“Percents (%)”)
xaxis = dict(tickmode = ‘linear’, tick0 = 0, dtick = 1))
fig.update_traces(textfont_size=12, textangle=0, textposition=“outside”, cliponaxis=False)

Hi @aviv and welcome to the forum! :tada:

I believe specifying in px.histogram text_auto='.2f' instead of text_auto=True should accomplish what you want. Can you try that?

1 Like

Beautiful. Thank you and I am glad to be part of this forum.