import matplotlib.pyplot as plt
# Datos proporcionados
rangos = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]
temp_pv = [83.82, 81.28, 80.68, 80.51, 80.51, 80.58, 80.69, 80.83, 80.99, 81.15]
temp_absorbedor = [80.19, 79.49, 79.51, 79.66, 79.84, 80.04, 80.24, 80.45, 80.66, 80.87]
temp_sustrato = [80.1, 79.4, 79.42, 79.56, 79.75, 79.95, 80.15, 80.36, 80.57, 80.77]
temp_htf_salida = [78.41, 78.76, 79.04, 79.29, 79.53, 79.76, 79.99, 80.21, 80.43, 80.65]
# 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('Longitud del SRC-PVT (m)', fontsize=22)
plt.ylabel('Temperatura (°C)', fontsize=22)
plt.title('Temperaturas del SRC-PVT vs Longitud del SRC-PVT', 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(78, 86) # Ajuste del rango del eje y
plt.tight_layout()
# Guardar la figura con la resolución especificada
plt.savefig('grafico_temperaturas_srcpvt_longitud.png', dpi=100)
plt.show()
To embed this program on your website, copy the following code and paste it into your website's HTML: