Note
Added by v2024.12.1
This it to embed Stlite content into your documents.
Add this into your conf.py
of Sphinx.
extensions = [
"atsphinx.toybox.stlite",
]
"0.76.0"
Using Stlite version.
.. stlite::
:id: stlite-demo
:requirements: matplotlib
import streamlit as st
import matplotlib.pyplot as plt
import numpy as np
size = st.slider("Sample size", 100, 1000)
arr = np.random.normal(1, 1, size=size)
fig, ax = plt.subplots()
ax.hist(arr, bins=20)
st.pyplot(fig)