sentence st.pyplot(fig) stop the execution of the program. any help is appreciated
code:
import streamlit as st import matplotlib.pyplot as plt import numpy as np st.header("Header") arr = np.random.normal(1, 1, size=100) fig, ax = plt.subplots() ax.hist(arr, bins=20) st.pyplot(fig)
Hi @rodrivmor, welcome to the Streamlit community!
I don’t understand your question. Are you saying that the app stops/crashes when you run this code, or that you would like the app to stop running after pyplot runs?
Best, Randy
Hi The app stops/crashes when you run this code Regards
This code works locally on my machine. Are you having trouble on your computer or somewhere else like Streamlit Cloud?
On my computer Regards
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.