`st.plotly_chart` not render properly until an rerun while using `secondary_y` to overlay density curve to histogram

When I overlay density curve to histogram using ‘secondary_y’ parameter in plotly_chart, the figure displayed as follow, where the bottom is not aligned.

Then I click rerun, the figure displayed just as I want.

How can I render the figure as the second one in the first time? what’s the difference the two times of redering?

Hi @Tiran

Could you provide the code snippet to reproduce this plot in the app. This would allow others in the community to see what may potentially identify areas in the code that may be causing this.