#coding:utf-8import numpy as npimport matplotlib.pyplot as plt #X,Y轴数据y = [20,59,11,12,16,20,15,12,16,21,34,48,11,15,18,16,17,17,11,25,16,9,10,18,16,18,18]#计算list y的长度ylen = len(y)#print ylen #(开始值.终值 .元素个数作为X坐标目的实现X轴自动伸缩)xArray = np.linspace(0,ylen,