import numpy as np
import matplotlib.pyplot as plt

# example data
x = np.arange(5,15,1)
y_raw_length = [[257,236,289,257,278,266,262,287,262,287],[202,224,220,220,226,223,208,211,219,232],[147,185,191,172,183,173,191,184,183,177],[163,155,167,152,153,162,160,157,154,156],[159,139,124,133,140,135,147,139,125,128],[122,123,118,125,125,121,122,126,121,131],[110,114,108,103,108,117,107,108,108,109],[119,102,106,113,110,105,105,99,105,106],[97,91,91,88,111,101,97,98,94,97],[93,89,89,79,80,86,86,88,85,85]]
y_raw_iter = [[4,3,4,4,4,7,6,4,3,7],[2,7,4,3,7,3,8,4,4,4],[8,3,4,6,4,3,4,3,4,3],[3,2,4,4,4,6,6,10,3,4],[5,3,4,8,4,3,4,4,4,3],[7,3,8,9,4,3,4,3,4,4],[4,4,5,3,10,4,4,4,9,4],[3,9,7,6,4,6,4,3,4,7],[5,3,3,4,7,6,9,7,4,4],[8,11,4,5,4,3,7,4,10]]
plt.figure()

y_length = [np.mean(y) for y in y_raw_length]
yerr = [np.std(y) for y in y_raw_length]

plt.errorbar(x, y_length,  yerr, ecolor='b', capthick= 4 , fmt='--o')
plt.title("rrt_iterations vs step_size")
plt.ylabel("Num_rrt_iterations")
plt.xlabel("step_size")

plt.show()
