code: def plot_vs_mass(dataset, vars, filename, bins=60):
      
  
      n = len(vars)
  
      fig, axes = plt.subplots(nrows=n,
                               ncols=1,
                               sharex='col',
                               sharey=False)
      plt.subplots_adjust(wspace=0, hspace=0)
  
      m = 'log(m_{\chi})'
  
      for i, y in enumerate(vars):
          ax = axes[i]
          P = posterior.twoD(dataset+'.h5', m, y,
                             xlimits=limits(m), ylimits=limits(y), xbins=bins, ybins=bins)
  
          # apply some gaussian smoothing to make the contours slightly smoother
          sigmas = (np.diff(P.ycenters)[0], np.diff(P.xcenters)[0])
          P.pdf = gaussian_filter(P.pdf, sigmas, mode='nearest')
  
          P.plot(ax, levels=np.linspace(0.9, 0.1, 9))
          ax.set_xlabel(labels('log(m_{\chi})'))
          ax.set_ylabel(labels(y))
  
      fig.set_size_inches(4,n*3)
      fig.savefig(filename, dpi=200, bbox_inches='tight')
      plt.close(fig)
docs: Plot 2D marginalised posteriors of the 'vars' vs the dark matter mass.
      We plot the one sigma, and two sigma filled contours. More contours can be plotted
      which produces something more akin to a heatmap.
  
      If one require more complicated plotting, it is recommended to write a custom
      plotting function by extending the default plot() method.