#这里应该把trace plot 出来,同时,还应该把峰值给plot出来;
plt.figure()
plt.plot(sigAv, color='red', label='dis')
plt.plot(peaks, sigAv[peaks], "x")
plt.savefig(output)
plt.show()

 

plt.figure()
ax = bodyPart1['dis'].plot.line(color='blue', label='hand')
ax.set_xlabel('Frame')
ax.set_ylabel('Distance(pixel)')
plt.title('Distance from body part to nose(x:{},y:{})'.format(noseX, noseY))
plt.legend(loc='best')
plt.savefig(FigHandDistancePath)#保存图片
plt.show()