Indicating the statistically significant difference in bar graph
I use a bar graph to indicate the data of each group. Some of these bars differ significantly from each other. How can I indicate the significant difference in the bar plot? import numpy as np import matplotlib.pyplot as plt menMeans = (5, 15, 30, 40) menStd = (2, 3, 4, 5) ind = np.arange(4) # the x locations for the groups width=0.35 p1 = plt.bar(ind, menMeans, width=width, color='r', yerr=menStd) plt.xticks(ind+width/2., ('A', 'B', 'C', 'D') ) I am aiming for Hooked I've done a couple of things here that I suggest when working with complex plots. Pull out the custom formatting into a