Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement