x_mean = [] y_mean = [] x_3std1 = [] y_3std1 = [] x_3std2 = [] y_3std2 = [] for key in dic.keys(): value = dic[key] std = np.std(value) value_new = value / std dic[key] = value_new mean = np.mean(value_new) plotUtil.plotText(plt, key, 8.5, round(std, 2)) plotUtil.plotText(plt, key, 9, round(mean, 1)) count_value = len(value) x = [] for i in range(count_value): x.append(key) plt.plot(x, value_new, '.') x_mean.append(key) y_mean.append(mean) x_3std1.append(key) x_3std2.append(key) y_3std1.append(mean + 3)