File size: 263 Bytes
dd0ef30
9c1ffe9
 
 
dd0ef30
9c1ffe9
dd0ef30
 
 
 
 
 
9c1ffe9
dd0ef30
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import matplotlib.pyplot as plt
import numpy as np
import streamlit as st


@st.cache_data
def load_fig():
    arr = np.random.normal(1, 1, size=100)
    fig, ax = plt.subplots()
    ax.hist(arr, bins=20)
    return fig, ax


fig, ax = load_fig()

st.pyplot(fig)