docs: def main(data_dir, mtype_file):  # pylint: disable=too-many-locals
      '''Run the stuff'''
      # data structure to store results
      stuff = load_neurite_features(data_dir)
      sim_params = json.load(open(mtype_file))
  
      # load histograms, distribution parameter sets and figures into arrays.
      # To plot figures, do
      # plots[i].fig.show()
      # To modify an axis, do
      # plots[i].ax.something()
  
      _plots = []
  
      for feat, d in stuff.items():
          for typ, data in d.items():
              dist = sim_params['components'][typ].get(feat, None)
              print('Type = %s, Feature = %s, Distribution = %s' % (typ, feat, dist))
              # if no data available, skip this feature
              if not data:
                  print("No data found for feature %s (%s)" % (feat, typ))
                  continue
              # print 'DATA', data
              num_bins = 100
              limits = calc_limits(data, dist)
              bin_edges = np.linspace(limits[0], limits[1], num_bins + 1)
              histo = np.histogram(data, bin_edges, normed=True)
              print('PLOT LIMITS:', limits)
              # print 'DATA:', data
              # print 'BIN HEIGHT', histo[0]
              plot = Plot(*view_utils.get_figure(new_fig=True, subplot=111))
              plot.ax.set_xlim(*limits)
              plot.ax.bar(histo[1][:-1], histo[0], width=bin_widths(histo[1]))
              dp, bc = dist_points(histo[1], dist)
              # print 'BIN CENTERS:', bc, len(bc)
              if dp is not None:
                  # print 'DIST POINTS:', dp, len(dp)
                  plot.ax.plot(bc, dp, 'r*')
              plot.ax.set_title('%s (%s)' % (feat, typ))
              _plots.append(plot)
  
      return _plots