2024-10-05 13:23:18 发布
网友
我有100天的原始数据。四种方法确定了不同的有用天数数据
raw_days = 100 # Useful days identified by different methods Met1 = 92 Met2 = 93 Met3 = 96 Met4 = 91 commondays = 88 # Number of common useful days in four methods
我想用条形图表示上述信息。我不知道这是否可能。最后,我想看到的是一个条形图,如下图所示
我将回答部分问题,并将有关注释栏的部分留给您。您可以参考this question以获取注释
raw_days = 100 # Useful days identified by different methods Met1 = 92 Met2 = 93 Met3 = 96 Met4 = 91 commondays = 88 plt.bar(range(4), [Met1, Met2, Met3, Met4], color='r', ec='k') plt.bar(range(4), [commondays]*4, color='w', hatch='/', ec='k', label='common useful \ndays in four methods') plt.xticks(range(4), ['Met%i'%i for i in range(1, 5)]) plt.yticks([]) plt.legend(loc=(1.05, 0.5)) plt.ylabel('Useful days')
我将回答部分问题,并将有关注释栏的部分留给您。您可以参考this question以获取注释
相关问题 更多 >
编程相关推荐