Skip to content

Commit

Permalink
bug fix for 0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesmartin14 committed Apr 1, 2021
1 parent 801a2a3 commit b41023d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions weightwatcher/RMT_Util.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,3 +502,14 @@ def fit_density_with_range(evals, Q, bw=0.1, sigma_range=(slice(0.3, 1.05, 0.1),
#
# return pd.DataFrame(df_output, columns = ['spikes', 'sigma', 'F_norm'])


def plot_loghist(x, bins, xmin):
hist, bins = np.histogram(x, bins=bins)
logbins = np.logspace(np.log10(bins[0]),np.log10(bins[-1]),len(bins))
plt.hist(x, bins=logbins, density=True)

if xmin:
plt.axvline(xmin, color='r', label=r'$\lambda_{min}$')

plt.xscale('log')

0 comments on commit b41023d

Please sign in to comment.