SHARE
TWEET

Untitled

a guest Feb 20th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def plot_Hist_Pdf_Cdf(values, mu, sigma):
  2.     import numpy as np
  3.     import scipy.special  
  4.     from bokeh.layouts import gridplot
  5.     from bokeh.plotting import figure, show, output_file
  6.  
  7.     x = np.linspace(0, np.max(values), 1000)
  8.     pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2))
  9.     cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2
  10.     graph_title = "Title"
  11.     p1 = make_plot(graph_title, hist, edges, x, pdf, cdf)
  12.  
  13.     #output_file('histogram.html', title="histogram.py example")
  14.     show(gridplot([p1], ncols=2, plot_width=400, plot_height=400, toolbar_location=None))
  15.     return
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top