Skip to content

Instantly share code, notes, and snippets.

@SaremS
Created May 9, 2023 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SaremS/2c214bba7c55cf60b5e2d7610698c6bc to your computer and use it in GitHub Desktop.
Save SaremS/2c214bba7c55cf60b5e2d7610698c6bc to your computer and use it in GitHub Desktop.
from scipy.stats import gaussian_kde
plt.figure(figsize = (10,8))
plt.grid(alpha = 0.5)
plt.hist(diffed_s,bins=20,density = True,alpha=0.5, label = "Histogram of diffed time-series")
kde = gaussian_kde(diffed_s)
target_range = np.linspace(np.min(diffed_s)-0.5,np.max(diffed_s)+0.5,num=100)
plt.plot(target_range, kde.pdf(target_range),color="green",lw=3, label = "Gaussian Kernel Density of diffed time-series")
plt.legend()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment