How to plot histogram based on bin width and bin height?

In VegaLite.jl it would look like this:

using DataFrames, VegaLite

df = DataFrame(bin_start=[0., 1.], bin_end=[1,2.], count=[3,5])

df |>
  @vlplot(:bar, x={:bin_start, bin=:binned, axis={tickStep=1}}, x2=:bin_end, y=:count)

That right now returns:
example

Unfortunately the x axis labels are not looking great… I think that is a bug in vega-lite 2.x (the underlying JavaScript library that produces the actual plot). If I run the same spec through vega-lite 3.0.0-rc8 I get something that looks right:
visualization%20(3)

So I guess the story is that once vega-lite 3.0.0 is released, I will update VegaLite.jl to use it, and then it should look good out of the box. For now, one thing you can do is to plot the thing then click the button to open the spec in the “Vega Editor”. That will open up the online vega-lite editor, and that is based on vega-lite 3.0.0-rc8, and things look good there. You can then download the plot from there. Certainly not good, but the best option right now until the new version is released.

Oh, and the docs for pre-binned histograms is here.