@staticmethod
    def plot_density(distribution, Xs, Ys, log_domain=False):
        assert(distribution.dimension == 2)
        
        D = zeros((len(Xs), len(Ys)))
    
        # compute log-density
        for i in range(len(Xs)):
            for j in range(len(Ys)):
                x = array([[Xs[i], Ys[j]]])
                D[j, i] = distribution.log_pdf(x)
        
        if log_domain == False:
            D = exp(D)
        
        im = imshow(D, origin='lower')
        im.set_extent([Xs.min(), Xs.max(), Ys.min(), Ys.max()])
        im.set_interpolation('nearest')
        im.set_cmap('gray')
        ylim([Ys.min(), Ys.max()])
        xlim([Xs.min(), Xs.max()])
__init__
dataset/ETHPy150Open karlnapf/kameleon-mcmc/kameleon_mcmc/tools/Visualise.py/Visualise.plot_density--crossover with--dataset/ETHPy150Open ownport/pyservice/pyservice.py/Process.__init__