import pandas as pd from matplotlib import pyplot as plt import streamlit as st sheet_id = "1QvUSKqFzRjhk9hXXNcksiGOpbit_2r-QaejXq7_Z2FY" sheet_name = "Sheet1" url = f"https://docs.google.com/spreadsheets/d/{sheet_id}/gviz/tq?tqx=out:csv&sheet={sheet_name}" df = pd.read_csv(url) x = df['year'] y = df['number'] fig = plt.figure(figsize=(5, 5)) plt.plot(x,y) plt.title('line plot', fontweight='bold') st.pyplot(fig) fig = plt.figure(figsize=(5, 5)) plt.plot(x,y,'.') plt.title('dotplot', fontweight='bold') st.pyplot(fig)