I wanted to use minor ticks as this is released in plotly since version 5.8. This plotly functionality works fine for me when using only the plotly library with the following code:
import pandas as pd
import plotly.express as px
df = px.data.stocks()
fig = px.line(df, x=‘date’, y=“GOOG”)
fig.update_xaxes(minor=dict(ticks=“inside”, showgrid=True))
fig.show()
Normally I would be able to display these minor ticks on streamlit by changing fig.show() to st.plotly_chart(fig). The figure itself is displayed but the minor ticks are not visible in my streamlit application:
The minor ticks are however visible in the plotly figure:
Find the official plotly documentation in the following link: Time series and date axes in Python (plotly.com) please scroll down to the subheader ‘Adding Minor Ticks’.