您好,我使用
获得了数据集的导数data = pandas.read_csv("data", header = 1, index_col = 0)
datax = pandas.read_csv("data", header = 1, usecols = [0])
datay = pandas.read_csv("data", header = 1, usecols = [1])
index = [0]
datax_0= numpy.delete(datax,index)
datay_0= numpy.delete(datay,index)
diff = numpy.diff(datay_0)/numpy.diff(datax_0)
由于x / 0问题,我做了index = [0],但是我的问题是,当我进行绘图时,如何根据第一个datax获得x轴?绘制x数据时,diff x轴是什么甚至更好?
fig, ax = matplotlib.subplots()
ax.plot(derivative)
matplotlib.show()