我试图在条形图上绘制折线图。这是我的代码:
public static void Main()
{
Send().Wait();
}
我收到的错误是:
def hridef_base(x):
if x == 1:
deltatlapentry = EntrySummary['Avg tLap'] - EntrySummary2['Avg tLap']
deltatlapapex = ApexSummary['Avg tLap'] - ApexSummary2['Avg tLap']
deltatlapexit = ExitSummary['Avg tLap'] - ExitSummary2['Avg tLap']
index = (EntrySummary.index + 1)
barwidth = 0.2
plt.ylim(0.0, 65.0)
plt.bar(index-barwidth, EntrySummary['Avg FRH'], barwidth, color='r', yerr=EntrySummary['FRH StDev'], ecolor='k', label='Entry')
plt.bar(index, ApexSummary['Avg FRH'], barwidth, color='#4169E1', yerr=ApexSummary['FRH StDev'], ecolor='k', label='Apex')
plt.bar(index+barwidth, ExitSummary['Avg FRH'], barwidth, color='#32CD32', yerr=ExitSummary['FRH StDev'], ecolor='k', label='Exit')
plt.plot(index-barwidth, deltatlapentry, barwidth, color='k', label='Entry')
plt.plot(index, deltatlapapex, barwidth, color='k', label='Entry')
plt.plot(index+barwidth, deltatlapexit, barwidth, color='k', label='Entry')
plt.xlabel('Turn Number')
plt.ylabel('Average FRideH')
plt.title('Average FRideH for Baseline setup')
plt.xticks(index)
plt.legend()
plt.figure()
else:
print "Baseline FRideH Not Selected"
我很感激这方面的任何帮助。
(我应该注意代码的末尾是我运行函数和plt.show的时候)