# Recording of Makie hist changes output

**URL:** <https://discourse.julialang.org/t/recording-of-makie-hist-changes-output/110440>\
**Category:** Visualization\
**Created:** [February 20, 2024, 8:01am UTC](https://discourse.julialang.org/t/recording-of-makie-hist-changes-output/110440 "2024-02-20T08:01:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrBurner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drburner/32/207156_2.png) [@DrBurner](https://discourse.julialang.org/u/DrBurner)\
**Post date:** [February 20, 2024, 8:01am UTC](https://discourse.julialang.org/t/recording-of-makie-hist-changes-output/110440/1 "2024-02-20T08:01:38Z")

</div>

I’d like to make a short video of the build up of an histogram with a little bit of white space between the bins . Unfortunately the record block seems to ignore the width keyword.

```julia
using GLMakie

samples=rand(1:10,100)
samples_Obs = Observable(samples)

fig = Figure(size=(1000,400))
ax = Axis(fig[1,1])
my_bins = range(0.5, 10.5, 11)
hist!(ax, samples_Obs, bins=my_bins, width=0.75)

### using fig alone accepts the width=0.75
fig

### making an animation ignores the width=0.75
record(fig, "time_animation.mp4",1:100; framerate=10) do ind
    samples_Obs[] = samples[1:ind]
end

```

Any idea on how to keep the spacing when recording the video?

---

<div class="post-metadata">

**Author:** ![DrBurner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drburner/32/207156_2.png) [@DrBurner](https://discourse.julialang.org/u/DrBurner)\
**Post date:** [February 20, 2024, 1:05pm UTC](https://discourse.julialang.org/t/recording-of-makie-hist-changes-output/110440/2 "2024-02-20T13:05:33Z")

</div>

Found a workaround by using a `barplot` and `counts` from `StatsBase`:

```julia
using StatsBase

sampleCount = @lift(counts(samples_Obs,10))
barplot!(ax,1:10,sampleCount)

```

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [February 20, 2024, 1:11pm UTC](https://discourse.julialang.org/t/recording-of-makie-hist-changes-output/110440/3 "2024-02-20T13:11:26Z")

</div>

Can you please open an issue for further investigations?
