import matplotlib.pyplot as plt

# Meses en inglés
months = ['Ene', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 
          'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic']

# Datos de temperatura
pv_temp = [20.31, 22.81, 24.62, 26.17, 25.17, 26.07, 25.16, 23.48, 22.77, 23.52, 21.46, 20.42]
absorber_temp = [20.22, 22.71, 24.5, 26.07, 25.06, 25.96, 25.04, 23.4, 22.68, 23.43, 21.35, 20.33]
htf_outlet_temp = [19.41, 21.86, 23.49, 25.24, 24.15, 25.07, 24.02, 22.7, 21.92, 22.66, 20.35, 19.44]
htf_inlet_temp = [16.39, 18.54, 19.49, 21.8, 20.48, 21.36, 19.92, 19.89, 18.95, 19.58, 16.63, 16.2]

# Configuración del tamaño de la figura
fig, ax = plt.subplots(figsize=(12, 8))

# Graficar temperatura PV
ax.plot(months, pv_temp, marker='o', color='blue', linestyle='-', linewidth=2, label='Temperatura de los PV')

# Graficar temperatura Absorber
ax.plot(months, absorber_temp, marker='s', color='green', linestyle='-', linewidth=2, label='Temperatura del Absorbedor')

# Graficar temperatura HTF outlet
ax.plot(months, htf_outlet_temp, marker='^', color='red', linestyle='-', linewidth=2, label='Temperatura del HTF de salida')

# Graficar temperatura HTF inlet
ax.plot(months, htf_inlet_temp, marker='d', color='orange', linestyle='-', linewidth=2, label='Temperatura del HTF de entrada')

# Configuración de etiquetas y título
ax.set_ylabel('Temperatura (°C)', fontsize=20)
ax.set_xlabel('Meses', fontsize=20)
ax.tick_params(axis='both', labelsize=20)

# Título del gráfico
ax.set_title('', fontsize=22)

# Leyenda
ax.legend(loc='upper left', fontsize=20)

# Acentuar el marco del gráfico
for spine in ax.spines.values():
    spine.set_edgecolor('black')
    spine.set_linewidth(2)

# Ajuste de límites del eje Y
ax.set_ylim(16, 31)

# Ajuste de diseño
fig.tight_layout()

# Mostrar el gráfico
plt.show()

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: