jueves, 3 de septiembre de 2026

EXAMPLE 1

import matplotlib.pyplot as plt


# 1. Crear y guardar el gráfico de temperatura (línea)

x_temp = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]

y_temp = [20, 20, 25, 20, 20, 25, 20, 20, 20, 20, 20, 20, 25, 25]


plt.figure(figsize=(6, 4))

plt.scatter(x_temp, y_temp, color='black', linewidth=1.5)

plt.title("Temperature")

plt.tight_layout()


# Guardar la imagen con fondo blanco

plt.savefig("temperature.png", facecolor='white', dpi=300)

#plt.close()


import streamlit as st


st.title("Prueba de Monitoreo")

st.image("temperature.png")

st.image("scatter.png")


st.text("some tabs below")

tab1,tab2,tab3=st.tabs(["Tab1","Tab2","Tab3"])


with tab1:

    st.text("inside this tab there is an image")

    st.image("scatter.png")

No hay comentarios:

Publicar un comentario