nction returns the update function
// that redraw the bar if called with a new barwidth.
function plot_histogram(container, data, barwidth, xscale, yscale) {
    const min = d3.min(data),
	  max = d3.max(data);
    const hist = histogram(data, barwidth, min, max);
    const sample_nb = data.length;

    const print_value = function (v) {
	container.append("text")
	    .attr("class", "axisTitle")
	    .attr("id", "tt2")
	    .attr("x", wsvg-170)
	    .attr("y", 20)
	    .text("Value: "+d3.format("d")(v)+" / 