How streamlit show matplotlib figure in HTML?

Hi,

In streamlit, to show a matplotlib figure, we use st.pyplot. I just wonder how streamlit does it behind the scenes

Thanks