0

I have 100 days of raw data. Four methods have identified a different number of useful days data.

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

I want to represent the above information in bar plots. I don't know if this is possible. At the end, What I want to see is a bar plot something like shown below.

enter image description here

Msquare
  • 775
  • 7
  • 17

1 Answers1

1

I will answer partially and leave the part about annotating the bars up to you. You can refer this question for annotations

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')

enter image description here

Sheldore
  • 37,862
  • 7
  • 57
  • 71