79483045

Date: 2025-03-04 08:25:06
Score: 0.5
Natty:
Report link

Just use a hack with columns.

col1, _ = st.columns([.2, .8])
with col1:
    st.pyplot(fig)

It will set the with of the figure to 20% of the total with of the streamlit page.

If you need to center the figure:

col1, col2, _ = st.columns([.4, .2, .4])
with col2:
    st.pyplot(fig)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: SergeyR