How to do histogram in excel8/25/2023 HistC, bin_edgesC = np.histogram(a=combined_H, bins = Bins, weights = combined_W) #Appends new values to the end of the numpy arrayĬombined_H = np.append(arr=minH_Array,values=maxH_Array)Ĭombined_W = np.append(arr=minH_W_Array, values=maxH_W_Array) #Plotting Min and Max Z values separatelyįig = plt.figure(figsize = plt.figaspect(0.45))Īx.set_xlim(min(bin_edges),max(bin_edges))Īx.set_xlim(min(bin_edges2),max(bin_edges2)) Hist2,bin_edges2 = np.histogram(a=maxH_Array, bins=Bins, weights=maxH_W_Array) Hist, bin_edges = np.histogram(a=minH_Array, bins = Bins, weights = minH_W_Array) #Creating numpy array (keeps the same order as the values were put in) #convert text file strings to floats and add to relevant list Item = line.split(",")#Items in a csv file are split according to ',' ![]() It's just easier to use python's numpy library to achieve this (not coded very efficiently but hopefully someone can improve it?): import numpy as npīins = np.array() ![]() This isn't exactly a solution to creating a weighted histogram in MS Excel but rather an alternative method to achieve the same result.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |