import matplotlib.pyplot as plt

times = []


barilla_mt = [21.01, 21.94, 24.5, 20.81, 21.3, 23.23, 23.84, 24.75, 23.44, 22.31, 22.97, 24.16, 24.01, 25.37, 25.94, 26.94, 28.63, 29.25, 29.69, 31.06, 34.02, 32.3, 33.79, 35.33, 35.76, 36.65, 37.21, 37.71, 38.3, 40.69, 41.95, 41.05, 42.11, 43.91, 47.38, 46.25, 49.43, 49.79, 48.29, 49.15, 50.35, 51.82, 53.59, 56.62, 53.26, 53.27, 54.56, 57.14, 57.02, 63.76, 60.16, 59.21, 62.7, 62.45, 65.2, 64.32, 67.0, 66.06, 70.49, 68.22, 68.63, 70.7, 73.62, 70.86]
barilla_st = [31.06, 31.77, 33.45, 35.54, 35.51, 37.21, 37.91, 38.84, 40.18, 41.54, 42.51, 43.3, 44.42, 45.0, 46.59, 47.47, 48.09, 49.07, 49.79, 51.48, 53.0, 53.51, 54.69, 55.46, 57.69, 58.6, 59.47, 61.23, 61.66, 63.28, 64.27, 65.3, 66.27, 67.03, 68.58, 69.84, 71.61, 73.02, 74.88, 75.39, 77.12, 78.44, 79.14, 79.97, 80.82, 81.67, 82.58, 83.34, 84.13, 85.56, 86.37, 87.21, 88.2, 89.31, 91.15, 92.31, 94.01, 95.32, 96.21, 96.93, 97.91, 98.65, 100.13, 101.15]


x = range(4, len(barilla_mt) + 4)
t = (barilla_mt, barilla_st, x, 'barilla', 'b', 'r')
times.append(t)

# caffe_mt = [33.08, 32.14, 33.03, 33.74, 34.33, 35.19, 35.55, 37.1, 37.84, 40.72, 39.61, 43.27, 41.77, 41.88, 42.67, 44.52,
#             44.52, 46.01, 49.89, 49.59, 50.94, 52.12, 51.64, 56.61, 54.48, 55.2, 57.13, 56.71, 57.57, 59.8, 59.0, 59.75,
#             62.84, 62.9, 63.63, 64.38, 66.19, 68.14, 67.41, 68.61, 69.51, 70.48, 71.18, 73.85, 76.97, 76.35, 77.17, 77.6,
#             78.38, 81.14, 79.66, 81.67, 84.37, 82.38, 84.37, 84.74, 86.17, 90.87, 91.51, 91.75, 92.98, 92.91, 93.99]
# caffe_st = [-1] * len(caffe_mt)
# x = range(5, len(caffe_mt) + 5)
# c = (caffe_mt, caffe_st, x, 'caffe', 'b', 'r')
# times.append(c)

saponi_mt = [19.5, 20.73, 18.73, 19.28, 19.65, 20.48, 20.67, 21.59, 22.06, 22.32, 23.02, 24.21, 24.99, 25.62, 26.25, 26.62, 27.8, 28.53, 28.95, 29.96, 30.31, 30.29, 30.86, 32.19, 32.78, 33.48, 33.55, 35.01, 35.43, 35.69, 36.89, 37.36, 38.1, 38.48, 38.88, 40.3, 40.49, 40.61, 41.26, 42.85, 42.9, 43.56, 44.8, 45.05, 45.18, 46.54, 46.74, 47.17, 47.89, 48.55, 49.38, 49.9, 50.02, 50.76, 51.13, 52.34]
saponi_st = [36.52, 38.11, 39.03, 40.72, 42.14, 43.66, 44.67, 46.25, 47.03, 48.01, 48.92, 50.46, 52.12, 53.67, 55.25, 56.13, 57.83, 59.29, 60.3, 61.73, 62.74, 63.58, 64.49, 66.02, 67.68, 68.58, 69.59, 71.03, 72.12, 73.0, 74.64, 75.52, 77.2, 78.19, 79.11, 80.6, 81.74, 82.33, 83.62, 85.08, 86.05, 86.93, 88.68, 89.46, 90.41, 91.61, 92.58, 93.48, 95.09, 95.99, 97.6, 99.01, 99.29, 100.26, 100.91, 102.67]
x = range(12, len(saponi_mt) + 12)
c = (saponi_mt, saponi_st, x, 'caffe', 'b', 'r')
times.append(c)

caffe_carrefour_mt = [21.25, 24.96, 21.03, 22.06, 22.67, 23.8, 24.35, 26.06, 26.44, 27.42, 28.41, 29.23, 29.54, 31.46,
                      31.45, 32.26, 33.04, 34.17, 35.0, 37.17, 36.89, 37.97, 39.55, 40.6, 42.32, 44.19, 44.13, 45.12,
                      46.72, 47.06, 47.52, 48.38, 50.18, 54.6, 50.57, 52.09, 52.65, 57.69, 53.81, 57.2, 58.1, 60.0, 59.35,
                      60.18, 60.96, 63.29, 64.33, 60.7, 61.63, 63.08, 65.66, 65.28, 65.53]
caffe_carrefour_st = [36.13, 37.15, 38.29, 39.29, 44.18, 47.39, 43.27, 44.6, 52.93, 57.58, 53.35, 55.7, 58.44,
                          59.56, 60.74, 62.84, 62.53, 65.86, 66.45, 70.19, 71.12, 73.59, 75.23, 75.59, 75.25, 78.22,
                          78.59, 81.72, 83.36, 84.24, 85.94, 86.78, 90.07, 88.51, 90.51, 97.3, 105.43, 106.18, 102.02,
                          93.97, 96.41, 96.49, 97.36, 100.47, 100.96, 102.63, 102.87, 103.6, 106.16, 107.28, 109.31,
                          110.04, 111.53]


x = range(15, len(caffe_carrefour_mt) + 15) # numero di template

cc = (caffe_carrefour_mt, caffe_carrefour_st, x, 'Caffe-Carrefour', 'b', 'r')
times.append(cc)


fig, axs = plt.subplots(1, 3, figsize=(15, 5))

for i, t in enumerate(times):
    mt, st, x, l, c_mt, c_st = t
    label = "Scene {}".format(i+1)

    axs[i].set_title(label)
    axs[i].set(xlabel='Number of templates', ylabel='Execution time [s]')
    axs[i].plot(x, mt, c_mt, label="Multi processes")
    axs[i].plot(x, st, c_st, label="Single process")
    axs[i].legend()
    axs[i].grid()

# plt.show()
plt.savefig("efficiency.png")
e4fe5653953f3997e0212e81fd4b442c38d19295
<mask token>

<mask token>
times.append(t)
<mask token>
times.append(c)
<mask token>
times.append(cc)
<mask token>
for i, t in enumerate(times):
    mt, st, x, l, c_mt, c_st = t
    label = 'Scene {}'.format(i + 1)
    axs[i].set_title(label)
    axs[i].set(xlabel='Number of templates', ylabel='Execution time [s]')
    axs[i].plot(x, mt, c_mt, label='Multi processes')
    axs[i].plot(x, st, c_st, label='Single process')
    axs[i].legend()
    axs[i].grid()
plt.savefig('efficiency.png')

<mask token>
times = []
barilla_mt = [21.01, 21.94, 24.5, 20.81, 21.3, 23.23, 23.84, 24.75, 23.44, 
    22.31, 22.97, 24.16, 24.01, 25.37, 25.94, 26.94, 28.63, 29.25, 29.69, 
    31.06, 34.02, 32.3, 33.79, 35.33, 35.76, 36.65, 37.21, 37.71, 38.3, 
    40.69, 41.95, 41.05, 42.11, 43.91, 47.38, 46.25, 49.43, 49.79, 48.29, 
    49.15, 50.35, 51.82, 53.59, 56.62, 53.26, 53.27, 54.56, 57.14, 57.02, 
    63.76, 60.16, 59.21, 62.7, 62.45, 65.2, 64.32, 67.0, 66.06, 70.49, 
    68.22, 68.63, 70.7, 73.62, 70.86]
barilla_st = [31.06, 31.77, 33.45, 35.54, 35.51, 37.21, 37.91, 38.84, 40.18,
    41.54, 42.51, 43.3, 44.42, 45.0, 46.59, 47.47, 48.09, 49.07, 49.79, 
    51.48, 53.0, 53.51, 54.69, 55.46, 57.69, 58.6, 59.47, 61.23, 61.66, 
    63.28, 64.27, 65.3, 66.27, 67.03, 68.58, 69.84, 71.61, 73.02, 74.88, 
    75.39, 77.12, 78.44, 79.14, 79.97, 80.82, 81.67, 82.58, 83.34, 84.13, 
    85.56, 86.37, 87.21, 88.2, 89.31, 91.15, 92.31, 94.01, 95.32, 96.21, 
    96.93, 97.91, 98.65, 100.13, 101.15]
x = range(4, len(barilla_mt) + 4)
t = barilla_mt, barilla_st, x, 'barilla', 'b', 'r'
times.append(t)
saponi_mt = [19.5, 20.73, 18.73, 19.28, 19.65, 20.48, 20.67, 21.59, 22.06, 
    22.32, 23.02, 24.21, 24.99, 25.62, 26.25, 26.62, 27.8, 28.53, 28.95, 
    29.96, 30.31, 30.29, 30.86, 32.19, 32.78, 33.48, 33.55, 35.01, 35.43, 
    35.69, 36.89, 37.36, 38.1, 38.48, 38.88, 40.3, 40.49, 40.61, 41.26, 
    42.85, 42.9, 43.56, 44.8, 45.05, 45.18, 46.54, 46.74, 47.17, 47.89, 
    48.55, 49.38, 49.9, 50.02, 50.76, 51.13, 52.34]
saponi_st = [36.52, 38.11, 39.03, 40.72, 42.14, 43.66, 44.67, 46.25, 47.03,
    48.01, 48.92, 50.46, 52.12, 53.67, 55.25, 56.13, 57.83, 59.29, 60.3, 
    61.73, 62.74, 63.58, 64.49, 66.02, 67.68, 68.58, 69.59, 71.03, 72.12, 
    73.0, 74.64, 75.52, 77.2, 78.19, 79.11, 80.6, 81.74, 82.33, 83.62, 
    85.08, 86.05, 86.93, 88.68, 89.46, 90.41, 91.61, 92.58, 93.48, 95.09, 
    95.99, 97.6, 99.01, 99.29, 100.26, 100.91, 102.67]
x = range(12, len(saponi_mt) + 12)
c = saponi_mt, saponi_st, x, 'caffe', 'b', 'r'
times.append(c)
caffe_carrefour_mt = [21.25, 24.96, 21.03, 22.06, 22.67, 23.8, 24.35, 26.06,
    26.44, 27.42, 28.41, 29.23, 29.54, 31.46, 31.45, 32.26, 33.04, 34.17, 
    35.0, 37.17, 36.89, 37.97, 39.55, 40.6, 42.32, 44.19, 44.13, 45.12, 
    46.72, 47.06, 47.52, 48.38, 50.18, 54.6, 50.57, 52.09, 52.65, 57.69, 
    53.81, 57.2, 58.1, 60.0, 59.35, 60.18, 60.96, 63.29, 64.33, 60.7, 61.63,
    63.08, 65.66, 65.28, 65.53]
caffe_carrefour_st = [36.13, 37.15, 38.29, 39.29, 44.18, 47.39, 43.27, 44.6,
    52.93, 57.58, 53.35, 55.7, 58.44, 59.56, 60.74, 62.84, 62.53, 65.86, 
    66.45, 70.19, 71.12, 73.59, 75.23, 75.59, 75.25, 78.22, 78.59, 81.72, 
    83.36, 84.24, 85.94, 86.78, 90.07, 88.51, 90.51, 97.3, 105.43, 106.18, 
    102.02, 93.97, 96.41, 96.49, 97.36, 100.47, 100.96, 102.63, 102.87, 
    103.6, 106.16, 107.28, 109.31, 110.04, 111.53]
x = range(15, len(caffe_carrefour_mt) + 15)
cc = caffe_carrefour_mt, caffe_carrefour_st, x, 'Caffe-Carrefour', 'b', 'r'
times.append(cc)
fig, axs = plt.subplots(1, 3, figsize=(15, 5))
for i, t in enumerate(times):
    mt, st, x, l, c_mt, c_st = t
    label = 'Scene {}'.format(i + 1)
    axs[i].set_title(label)
    axs[i].set(xlabel='Number of templates', ylabel='Execution time [s]')
    axs[i].plot(x, mt, c_mt, label='Multi processes')
    axs[i].plot(x, st, c_st, label='Single process')
    axs[i].legend()
    axs[i].grid()
plt.savefig('efficiency.png')

import matplotlib.pyplot as plt
times = []
barilla_mt = [21.01, 21.94, 24.5, 20.81, 21.3, 23.23, 23.84, 24.75, 23.44, 
    22.31, 22.97, 24.16, 24.01, 25.37, 25.94, 26.94, 28.63, 29.25, 29.69, 
    31.06, 34.02, 32.3, 33.79, 35.33, 35.76, 36.65, 37.21, 37.71, 38.3, 
    40.69, 41.95, 41.05, 42.11, 43.91, 47.38, 46.25, 49.43, 49.79, 48.29, 
    49.15, 50.35, 51.82, 53.59, 56.62, 53.26, 53.27, 54.56, 57.14, 57.02, 
    63.76, 60.16, 59.21, 62.7, 62.45, 65.2, 64.32, 67.0, 66.06, 70.49, 
    68.22, 68.63, 70.7, 73.62, 70.86]
barilla_st = [31.06, 31.77, 33.45, 35.54, 35.51, 37.21, 37.91, 38.84, 40.18,
    41.54, 42.51, 43.3, 44.42, 45.0, 46.59, 47.47, 48.09, 49.07, 49.79, 
    51.48, 53.0, 53.51, 54.69, 55.46, 57.69, 58.6, 59.47, 61.23, 61.66, 
    63.28, 64.27, 65.3, 66.27, 67.03, 68.58, 69.84, 71.61, 73.02, 74.88, 
    75.39, 77.12, 78.44, 79.14, 79.97, 80.82, 81.67, 82.58, 83.34, 84.13, 
    85.56, 86.37, 87.21, 88.2, 89.31, 91.15, 92.31, 94.01, 95.32, 96.21, 
    96.93, 97.91, 98.65, 100.13, 101.15]
x = range(4, len(barilla_mt) + 4)
t = barilla_mt, barilla_st, x, 'barilla', 'b', 'r'
times.append(t)
saponi_mt = [19.5, 20.73, 18.73, 19.28, 19.65, 20.48, 20.67, 21.59, 22.06, 
    22.32, 23.02, 24.21, 24.99, 25.62, 26.25, 26.62, 27.8, 28.53, 28.95, 
    29.96, 30.31, 30.29, 30.86, 32.19, 32.78, 33.48, 33.55, 35.01, 35.43, 
    35.69, 36.89, 37.36, 38.1, 38.48, 38.88, 40.3, 40.49, 40.61, 41.26, 
    42.85, 42.9, 43.56, 44.8, 45.05, 45.18, 46.54, 46.74, 47.17, 47.89, 
    48.55, 49.38, 49.9, 50.02, 50.76, 51.13, 52.34]
saponi_st = [36.52, 38.11, 39.03, 40.72, 42.14, 43.66, 44.67, 46.25, 47.03,
    48.01, 48.92, 50.46, 52.12, 53.67, 55.25, 56.13, 57.83, 59.29, 60.3, 
    61.73, 62.74, 63.58, 64.49, 66.02, 67.68, 68.58, 69.59, 71.03, 72.12, 
    73.0, 74.64, 75.52, 77.2, 78.19, 79.11, 80.6, 81.74, 82.33, 83.62, 
    85.08, 86.05, 86.93, 88.68, 89.46, 90.41, 91.61, 92.58, 93.48, 95.09, 
    95.99, 97.6, 99.01, 99.29, 100.26, 100.91, 102.67]
x = range(12, len(saponi_mt) + 12)
c = saponi_mt, saponi_st, x, 'caffe', 'b', 'r'
times.append(c)
caffe_carrefour_mt = [21.25, 24.96, 21.03, 22.06, 22.67, 23.8, 24.35, 26.06,
    26.44, 27.42, 28.41, 29.23, 29.54, 31.46, 31.45, 32.26, 33.04, 34.17, 
    35.0, 37.17, 36.89, 37.97, 39.55, 40.6, 42.32, 44.19, 44.13, 45.12, 
    46.72, 47.06, 47.52, 48.38, 50.18, 54.6, 50.57, 52.09, 52.65, 57.69, 
    53.81, 57.2, 58.1, 60.0, 59.35, 60.18, 60.96, 63.29, 64.33, 60.7, 61.63,
    63.08, 65.66, 65.28, 65.53]
caffe_carrefour_st = [36.13, 37.15, 38.29, 39.29, 44.18, 47.39, 43.27, 44.6,
    52.93, 57.58, 53.35, 55.7, 58.44, 59.56, 60.74, 62.84, 62.53, 65.86, 
    66.45, 70.19, 71.12, 73.59, 75.23, 75.59, 75.25, 78.22, 78.59, 81.72, 
    83.36, 84.24, 85.94, 86.78, 90.07, 88.51, 90.51, 97.3, 105.43, 106.18, 
    102.02, 93.97, 96.41, 96.49, 97.36, 100.47, 100.96, 102.63, 102.87, 
    103.6, 106.16, 107.28, 109.31, 110.04, 111.53]
x = range(15, len(caffe_carrefour_mt) + 15)
cc = caffe_carrefour_mt, caffe_carrefour_st, x, 'Caffe-Carrefour', 'b', 'r'
times.append(cc)
fig, axs = plt.subplots(1, 3, figsize=(15, 5))
for i, t in enumerate(times):
    mt, st, x, l, c_mt, c_st = t
    label = 'Scene {}'.format(i + 1)
    axs[i].set_title(label)
    axs[i].set(xlabel='Number of templates', ylabel='Execution time [s]')
    axs[i].plot(x, mt, c_mt, label='Multi processes')
    axs[i].plot(x, st, c_st, label='Single process')
    axs[i].legend()
    axs[i].grid()
plt.savefig('efficiency.png')

import matplotlib.pyplot as plt

times = []


barilla_mt = [21.01, 21.94, 24.5, 20.81, 21.3, 23.23, 23.84, 24.75, 23.44, 22.31, 22.97, 24.16, 24.01, 25.37, 25.94, 26.94, 28.63, 29.25, 29.69, 31.06, 34.02, 32.3, 33.79, 35.33, 35.76, 36.65, 37.21, 37.71, 38.3, 40.69, 41.95, 41.05, 42.11, 43.91, 47.38, 46.25, 49.43, 49.79, 48.29, 49.15, 50.35, 51.82, 53.59, 56.62, 53.26, 53.27, 54.56, 57.14, 57.02, 63.76, 60.16, 59.21, 62.7, 62.45, 65.2, 64.32, 67.0, 66.06, 70.49, 68.22, 68.63, 70.7, 73.62, 70.86]
barilla_st = [31.06, 31.77, 33.45, 35.54, 35.51, 37.21, 37.91, 38.84, 40.18, 41.54, 42.51, 43.3, 44.42, 45.0, 46.59, 47.47, 48.09, 49.07, 49.79, 51.48, 53.0, 53.51, 54.69, 55.46, 57.69, 58.6, 59.47, 61.23, 61.66, 63.28, 64.27, 65.3, 66.27, 67.03, 68.58, 69.84, 71.61, 73.02, 74.88, 75.39, 77.12, 78.44, 79.14, 79.97, 80.82, 81.67, 82.58, 83.34, 84.13, 85.56, 86.37, 87.21, 88.2, 89.31, 91.15, 92.31, 94.01, 95.32, 96.21, 96.93, 97.91, 98.65, 100.13, 101.15]


x = range(4, len(barilla_mt) + 4)
t = (barilla_mt, barilla_st, x, 'barilla', 'b', 'r')
times.append(t)

# caffe_mt = [33.08, 32.14, 33.03, 33.74, 34.33, 35.19, 35.55, 37.1, 37.84, 40.72, 39.61, 43.27, 41.77, 41.88, 42.67, 44.52,
#             44.52, 46.01, 49.89, 49.59, 50.94, 52.12, 51.64, 56.61, 54.48, 55.2, 57.13, 56.71, 57.57, 59.8, 59.0, 59.75,
#             62.84, 62.9, 63.63, 64.38, 66.19, 68.14, 67.41, 68.61, 69.51, 70.48, 71.18, 73.85, 76.97, 76.35, 77.17, 77.6,
#             78.38, 81.14, 79.66, 81.67, 84.37, 82.38, 84.37, 84.74, 86.17, 90.87, 91.51, 91.75, 92.98, 92.91, 93.99]
# caffe_st = [-1] * len(caffe_mt)
# x = range(5, len(caffe_mt) + 5)
# c = (caffe_mt, caffe_st, x, 'caffe', 'b', 'r')
# times.append(c)

saponi_mt = [19.5, 20.73, 18.73, 19.28, 19.65, 20.48, 20.67, 21.59, 22.06, 22.32, 23.02, 24.21, 24.99, 25.62, 26.25, 26.62, 27.8, 28.53, 28.95, 29.96, 30.31, 30.29, 30.86, 32.19, 32.78, 33.48, 33.55, 35.01, 35.43, 35.69, 36.89, 37.36, 38.1, 38.48, 38.88, 40.3, 40.49, 40.61, 41.26, 42.85, 42.9, 43.56, 44.8, 45.05, 45.18, 46.54, 46.74, 47.17, 47.89, 48.55, 49.38, 49.9, 50.02, 50.76, 51.13, 52.34]
saponi_st = [36.52, 38.11, 39.03, 40.72, 42.14, 43.66, 44.67, 46.25, 47.03, 48.01, 48.92, 50.46, 52.12, 53.67, 55.25, 56.13, 57.83, 59.29, 60.3, 61.73, 62.74, 63.58, 64.49, 66.02, 67.68, 68.58, 69.59, 71.03, 72.12, 73.0, 74.64, 75.52, 77.2, 78.19, 79.11, 80.6, 81.74, 82.33, 83.62, 85.08, 86.05, 86.93, 88.68, 89.46, 90.41, 91.61, 92.58, 93.48, 95.09, 95.99, 97.6, 99.01, 99.29, 100.26, 100.91, 102.67]
x = range(12, len(saponi_mt) + 12)
c = (saponi_mt, saponi_st, x, 'caffe', 'b', 'r')
times.append(c)

caffe_carrefour_mt = [21.25, 24.96, 21.03, 22.06, 22.67, 23.8, 24.35, 26.06, 26.44, 27.42, 28.41, 29.23, 29.54, 31.46,
                      31.45, 32.26, 33.04, 34.17, 35.0, 37.17, 36.89, 37.97, 39.55, 40.6, 42.32, 44.19, 44.13, 45.12,
                      46.72, 47.06, 47.52, 48.38, 50.18, 54.6, 50.57, 52.09, 52.65, 57.69, 53.81, 57.2, 58.1, 60.0, 59.35,
                      60.18, 60.96, 63.29, 64.33, 60.7, 61.63, 63.08, 65.66, 65.28, 65.53]
caffe_carrefour_st = [36.13, 37.15, 38.29, 39.29, 44.18, 47.39, 43.27, 44.6, 52.93, 57.58, 53.35, 55.7, 58.44,
                          59.56, 60.74, 62.84, 62.53, 65.86, 66.45, 70.19, 71.12, 73.59, 75.23, 75.59, 75.25, 78.22,
                          78.59, 81.72, 83.36, 84.24, 85.94, 86.78, 90.07, 88.51, 90.51, 97.3, 105.43, 106.18, 102.02,
                          93.97, 96.41, 96.49, 97.36, 100.47, 100.96, 102.63, 102.87, 103.6, 106.16, 107.28, 109.31,
                          110.04, 111.53]


x = range(15, len(caffe_carrefour_mt) + 15) # numero di template

cc = (caffe_carrefour_mt, caffe_carrefour_st, x, 'Caffe-Carrefour', 'b', 'r')
times.append(cc)


fig, axs = plt.subplots(1, 3, figsize=(15, 5))

for i, t in enumerate(times):
    mt, st, x, l, c_mt, c_st = t
    label = "Scene {}".format(i+1)

    axs[i].set_title(label)
    axs[i].set(xlabel='Number of templates', ylabel='Execution time [s]')
    axs[i].plot(x, mt, c_mt, label="Multi processes")
    axs[i].plot(x, st, c_st, label="Single process")
    axs[i].legend()
    axs[i].grid()

# plt.show()
plt.savefig("efficiency.png")