import matplotlib.pyplot as plt

# Datos proporcionados
rangos = [0.03, 0.025, 0.02, 0.015, 0.01, 0.005]
temp_pv = [80.59, 80.58, 80.61, 80.72, 81.14, 83.24]
temp_absorbedor = [79.55, 79.54, 79.56, 79.68, 80.1, 82.2]
temp_sustrato = [79.46, 79.45, 79.47, 79.59, 80.01, 82.1]
temp_htf_salida = [79.12, 79.12, 79.12, 79.12, 79.13, 79.14]

# Configuración del gráfico
plt.figure(figsize=(10.67, 8))  # Tamaño en pulgadas para una escala 4:3 y resolución 800x600
plt.plot(rangos, temp_pv, marker='o', color='blue', markersize=8, linestyle='-', linewidth=2, label='Temp. PV')
plt.plot(rangos, temp_absorbedor, marker='s', color='red', markersize=8, linestyle='-', linewidth=2, label='Temp. absorbedor')
plt.plot(rangos, temp_sustrato, marker='^', color='green', markersize=8, linestyle='-', linewidth=2, label='Temp. sustrato')
plt.plot(rangos, temp_htf_salida, marker='d', color='purple', markersize=8, linestyle='-', linewidth=2, label='Temp. HTF de salida')

plt.xlabel('Diámetro de tubería (m)', fontsize=22)
plt.ylabel('Temperatura (°C)', fontsize=22)
plt.title('Temperaturas del SRC-PVT vs Diámetro de tubería', fontsize=22)

plt.legend(loc='upper left', fontsize=16)

# Ajustes de los bordes de los ejes
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(rangos, fontsize=18)
plt.yticks(fontsize=18)

plt.ylim(79, 85)  # Ajuste del rango del eje y

plt.tight_layout()

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

plt.show()

Embed on website

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