python - Histogram not being plotted -


data = [1, 2, 1, 3, 3, 1, 4, 2] print("mean : ",np.mean(data)) print("standard deviation : ",np.std(data)) print("max : ",np.max(data)) print("min : ",np.min(data)) import matplotlib.pyplot plt plt.interactive(true)  plt.show(data) 

this code drawing histogram in pycharm ain't showing , printing print statement. need !

you have tell matplotlib want plot - in case, histogram of data.

data = [1, 2, 1, 3, 3, 1, 4, 2] print("mean : ",np.mean(data)) print("standard deviation : ",np.std(data)) print("max : ",np.max(data)) print("min : ",np.min(data)) import matplotlib.pyplot plt plt.interactive(true) plt.hist(data) plt.show(data) 

Comments

Popular posts from this blog

html - How to custom Bootstrap grid height? -

javascript - pass values from mssql to views in node -

javascript - Understanding ExtJS Framework Syntax -