increasing the frequency of the Y tick axis on the graph

37 Views Asked by At

Hello I am running this graph and would like to increase the Y tick axes frequency ......

fig3 = px.bar(x=area_price.index, y=area_price.values, title='معدل السعر للحي ',
              color_discrete_sequence=['white', 'blue'], text=area_price.values,
              template='plotly_dark')

fig3.update_traces(texttemplate='$%{text:,.85u6y2%f}', textposition='outside')
fig3.update_yaxes(title='Sale Price', tickprefix ='$', tickformat='1,2')
fig3.update_xaxes(title='Zoning')
fig3.update_layout( uniformtext_minsize=2 , uniformtext_mode='hide')
 
fig3.show()

..... I tried the above figure with px.bar and graph returned the Y axis with only 0 , 2, 4 .. how can i increase the frequency on the Y axis

1

There are 1 best solutions below

0
EricLavault On

You need to set the Y axis dtick accordingly :

fig3.update_yaxes(title='Sale Price', dtick=1, tickprefix ='$', tickformat='1,2')