import matplotlib.pyplot as plt

# Datos
meses = list(range(1, 13))
temp_pv = [63.92, 83.44, 99.45, 110.9, 113.7, 116.8, 113.0, 107.5, 101.6, 82.4, 66.05, 58.98]
temp_absorbedor = [63.29, 82.59, 98.46, 109.8, 112.5, 115.6, 111.9, 106.5, 100.6, 81.58, 65.38, 58.41]
temp_sustrato = [63.23, 82.52, 98.38, 109.7, 112.4, 115.5, 111.8, 106.4, 100.6, 81.51, 65.32, 58.37]
temp_htf_salida = [63.23, 82.52, 98.38, 109.7, 112.4, 115.5, 111.8, 106.4, 100.6, 81.51, 65.32, 58.37]
temp_htf_entrada = [18.75, 22.85, 29.15, 33.55, 32.45, 37.75, 35.75, 35.25, 33.35, 24.05, 18.05, 18.55]

# Configuración del gráfico
plt.figure(figsize=(10.67, 8))  # Tamaño de la figura

# Graficar las temperaturas en el lado izquierdo del eje
plt.plot(meses, temp_pv, marker='o', color='blue', markersize=8, linestyle='-', linewidth=2, label='Temp. PV')
plt.plot(meses, temp_absorbedor, marker='s', color='red', markersize=8, linestyle='-', linewidth=2, label='Temp. absorbedor')
plt.plot(meses, temp_sustrato, marker='^', color='green', markersize=8, linestyle='-', linewidth=2, label='Temp. sustrato')
plt.plot(meses, temp_htf_salida, marker='*', color='purple', markersize=8, linestyle='-', linewidth=2, label='Temp. HTF salida')
plt.plot(meses, temp_htf_entrada, marker='x', color='orange', markersize=8, linestyle='-', linewidth=2, label='Temp. HTF entrada')

# Configuraciones adicionales del gráfico
plt.xlabel('Mes', fontsize=22, fontname='Times New Roman')
plt.ylabel('Temperatura (°C)', fontsize=22, fontname='Times New Roman')
plt.title('Temperaturas del SRC-PVT para Mexicali', fontsize=22, fontname='Times New Roman')
plt.legend(loc='upper left', fontsize=16)
plt.grid(False)
plt.gca().spines['top'].set_linewidth(1.5)
plt.gca().spines['right'].set_linewidth(1.5)
plt.gca().spines['bottom'].set_linewidth(1.5)
plt.gca().spines['left'].set_linewidth(1.5)
plt.xticks(meses, fontsize=18)
plt.yticks(fontsize=18)
plt.ylim(0, 160)  # Establecer el rango del eje Y

# Guardar la figura con la resolución especificada
plt.tight_layout()
plt.savefig('temperaturas_mexicali.png', dpi=100)

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