给出的x轴的下限比给定的数据要小得多。在
我找到的所有曲线图只有±1*标准差。在
我也不知道如何像这样固定x轴。在
我的数据是一个python浮动列表。在
现在,我只有三个点,但是我希望在它们之间有一条直线,在这三个点上有一条垂直线。 x轴也不正确。在
plt.figure()
x = []
for item in circ_list:
x.append(float(item))
mean = np.mean(x)
std = np.std(x)
target_upper_bound = mean + 3 * std
target_lower_bound = mean - 3 * std
total_intermid = wear_limit[1] - wear_limit[0]
ten_percent_intermid = total_intermid / 10.0
plt.gca().axes.get_yaxis().set_visible(False)
plt.xlim([wear_limit[0], wear_limit[1]])
plt.plot(x, np.zeros_like(x), 'x')
plt.plot(np.array([mean, mean + 2 * std, mean - 2 * std]),
np.zeros_like(np.array([mean, mean + 2 * std, mean - 2 * std])), '|')
for i in x:
plt.annotate(str(i), xy=(i, 0))
plt.annotate('mean', xy=(mean, 0))
plt.annotate('mean+3*std', xy=(target_upper_bound, 0))
plt.annotate('mean-3*std', xy=(target_lower_bound, 0))
plt.show()
我不知道你到底想干什么。看看这个例子,如果它做的事情与你想要的相似?在
相关问题 更多 >
编程相关推荐