alkzar90's picture
Fix code
432ab81
raw
history blame
539 Bytes
import streamlit as st
import numpy as np
import matplotlib.pyplot as plt
number_of_observations = st.slider('Number of observations', min_value=50, max_value=150)
X = np.column_stack((np.ones(number_of_observations),
np.random.random(number_of_observations))
fig, ax = plt.subplots()
ax.set_xlim((0,1))
ax.set_ylim((-5,20))
ax.scatter(X[:,1], y, c='r', edgecolors='#fda172')
#line_thickness = 2
#line, = ax.plot([], [], lw=line_thickness)
st.pyplot(fig)
st.write(X[:5, :])