python - matplotlib - how to highlight a column in a histogram -


i'm working mock data set, small one. interested in displaying histogram of (for example) third column, , want column represents median highlighted different color rest, or highlighted in fashion.

this code far

import numpy np import matplotlib.pyplot plt  def graphfrequency(data, featurenumber):     plt.hist(data[:, featurenumber])     plt.xlabel("feature {}".format(featurenumber))     plt.ylabel("count")     plt.show()  data = np.load("data.npy") print np.median(data[:, 2]) graphfrequency(data, 2) 

it prints median 1.0 how highlight bin associated 1 in histogram?


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -