title: Fitting data to multimodal distributions with scipy, matplotlib
body: <p>I have a dataset that I would like to fit to a known probability distribution. The intention is to use the fitted PDF in a data generator - such that I can sample data from the known (fitted) PDF. Data will be used for simulation purposes. At the moment I am just sampling from a normal distribution, which is inconsistent with the real-data, therefore simulation results are not accurate. </p>
  
  <p>I first wanted to use the following method : 
  <a href="https://stackoverflow.com/questions/6620471/fitting-empirical-distribution-to-theoretical-ones-with-scipy-python">Fitting empirical distribution to theoretical ones with Scipy (Python)?</a></p>
  
  <p>My first thought was to fit it to a weibull distribution, but the data is actually multimodal (picture attached). So I guess I need to combine multiple distributions and then fit the data to the resulting dist, is that right ? Maybe combine a gaussian AND a weibull distirbution ?</p>
  
  <p>How can I use the scipy fit() function with a mixed/multimodal distribution ?</p>
  
  <p>Also I would want to do this in Python (i.e. scipy/numpy/matplotlib), as the data generator is written in Python.</p>
  
  <p>Many thanks !</p>
  
  <p><a href="https://i.stack.imgur.com/BzwGN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BzwGN.png" alt="histogram of data"></a></p>