fork download
  1. import matplotlib.pyplot as plt
  2. import pandas as pd
  3.  
  4. # Datos
  5. sol1 = [4.20e-06, 4.00e-07, 6.00e-07, 1.00e-06, 4.00e-07,
  6. 5.00e-07, 6.00e-07, 3.00e-07, 4.00e-07, 2.00e-07,
  7. 6.00e-07, 4.00e-07, 5.00e-07, 3.00e-07, 6.00e-07]
  8.  
  9. sol2 = [1.41e-04, 7.30e-05, 4.32e-05, 3.90e-05, 8.77e-05,
  10. 5.37e-05, 4.69e-05, 4.68e-05, 3.74e-05, 4.45e-05,
  11. 4.15e-05, 5.33e-05, 4.23e-05, 4.45e-05, 7.19e-05]
  12.  
  13. x = list(range(1, 16)) # Valores del 1 al 15
  14.  
  15. # Gráfico
  16. plt.figure(figsize=(10,6))
  17. plt.plot(x, sol1, marker="o", label="Sol1 length")
  18. plt.plot(x, sol2, marker="s", label="Sol2 miLength")
  19. plt.xlabel("Pruebas (1 a 15)")
  20. plt.ylabel("Tiempo de ejecución (s)")
  21. plt.title("Tiempos de ejecución: Sol1 vs Sol2")
  22. plt.legend()
  23. plt.grid(True)
  24. plt.show()
  25.  
Success #stdin #stdout 0.92s 78556KB
stdin
Standard input is empty
stdout
Standard output is empty