Skip to content

Commit

Permalink
fix hpd_plot interpolation (#1062)
Browse files Browse the repository at this point in the history
  • Loading branch information
aloctavodia authored Feb 10, 2020
1 parent ce0cf87 commit c2a2589
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arviz/plots/hpdplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def plot_hpd(
smooth_kwargs = {}
smooth_kwargs.setdefault("window_length", 55)
smooth_kwargs.setdefault("polyorder", 2)
eps = np.finfo(float).eps
x_data = np.linspace(x.min() + eps, x.max() - eps, 200)
x_data = np.linspace(x.min(), x.max(), 200)
x_data[0] = (x_data[0] + x_data[1]) / 2
hpd_interp = griddata(x, hpd_, x_data)
y_data = savgol_filter(hpd_interp, axis=0, **smooth_kwargs)
else:
Expand Down

0 comments on commit c2a2589

Please sign in to comment.