time_voltage = {1000 :760 , 3000 : 660, 4000 : 580, 6000 : 510,
7500 : 460,9000 : 430,12000 : 410,13500 : 380}
_time_admittance = {1000 :0.636842105 , 3000 : 0.660606061, 4000 : 0.586206897, 6000 : 0.596078431,7500 : 0.267391304,9000 : 0.262790698 ,12000 : 0.248780488,13500 : 0.25}
使用上述数据,我需要绘制如下脉冲序列。但我不知道从哪里开始。你能指出我正确的方向
sig = np.arange(15000)
sig.fill(0)
for time_at,voltage in time_voltage.items():
sig[time_at] = voltage
admittance = voltage - _time_admittance[time_at]
sig[time_at + 100] = admittance
sig1 = np.arange(15000)
sig1.fill(0)
for time_at,Admittance in _time_admittance.items():
for index in xrange(100):
sig1[time_at] = voltage
sig1[time_at + index] = Admittance
plt.grid = True
ax = plt.gca()
ax.set_axis_bgcolor('black')
ax.grid(True ,color= 'w')
plt.plot(sig)
plt.plot(sig1)
plt.show()