Skip to content

Commit b41023d

Browse files
bug fix for 0.4.2
1 parent 801a2a3 commit b41023d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

weightwatcher/RMT_Util.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,3 +502,14 @@ def fit_density_with_range(evals, Q, bw=0.1, sigma_range=(slice(0.3, 1.05, 0.1),
502502
#
503503
# return pd.DataFrame(df_output, columns = ['spikes', 'sigma', 'F_norm'])
504504

505+
506+
def plot_loghist(x, bins, xmin):
507+
hist, bins = np.histogram(x, bins=bins)
508+
logbins = np.logspace(np.log10(bins[0]),np.log10(bins[-1]),len(bins))
509+
plt.hist(x, bins=logbins, density=True)
510+
511+
if xmin:
512+
plt.axvline(xmin, color='r', label=r'$\lambda_{min}$')
513+
514+
plt.xscale('log')
515+

0 commit comments

Comments
 (0)