function FancyHistogram(Values, Color_1, Color_2, HistogramEdges)


[Numbins,~] = histcounts(Values,HistogramEdges);
min_val = HistogramEdges(1);
max_val = HistogramEdges(end);

for id_bin = 1:size(Numbins,2)
    center = (HistogramEdges(id_bin) + HistogramEdges(id_bin+1))*0.5;
    lambda = (center - min_val)/(max_val - min_val);
    Color = (Color_1*lambda) + (Color_2*(1-lambda));

    mod_bins = zeros(size(Numbins));
    mod_bins(id_bin) = Numbins(id_bin);

    % figure
    histogram('BinCounts', mod_bins, 'FaceColor',Color, 'BinEdges',HistogramEdges, 'FaceAlpha',1), hold on

end

axis([HistogramEdges(1) HistogramEdges(end) 0 size(Values,1)])






end