def plot_MCMC_trace(ax, xdata, ydata, trace, scatter=False, **kwargs):
 (xbins, ybins, sigma) = compute_sigma_level(trace[0], trace[1])
 ax.contour(xbins, ybins, sigma.T, levels=[0.683, 0.955], **kwargs)
 if scatter:
  ax.plot(trace[0], trace[1], ',k', alpha=0.1)
 ax.set_xlabel('$\\alpha$')
 ax.set_ylabel('$\\beta$')

def plot_MCMC_trace ( ax , xdata , ydata , trace , scatter = False , ** kwargs ) : ( xbins , ybins , sigma ) = compute_sigma_level ( trace [ 0 ] , trace [ 1 ] ) ax . contour ( xbins , ybins , sigma . T , levels = [ 0.683 , 0.955 ] , ** kwargs ) if scatter : ax . plot ( trace [ 0 ] , trace [ 1 ] , ',k' , alpha = 0.1 ) ax . set_xlabel ( '$\\alpha$' ) ax . set_ylabel ( '$\\beta$' )
plot traces and contours .