import matplotlib.pyplot as plt

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

# Nuevos datos de temperatura
pv_temp = [15.57, 23.93, 23.03, 26.31, 35.15, 36.78, 39.58, 37.78, 35.15, 27.45, 21.13, 17.83]
absorber_temp = [15.47, 23.82, 22.89, 26.16, 35, 36.61, 39.41, 37.64, 35.01, 27.32, 21.03, 17.77]
htf_outlet_temp = [14.53, 22.94, 21.72, 24.93, 34.01, 35.56, 38.44, 36.77, 34.08, 26.35, 20.12, 17.12]
htf_inlet_temp = [11.43, 19.43, 17.3, 19.98, 29.13, 30.23, 33.21, 32.21, 29.47, 22.22, 16.76, 14.81]

# 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(10, 50)

# 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: