# Gadfly histogram binwidth

**URL:** <https://discourse.julialang.org/t/gadfly-histogram-binwidth/49450>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 2, 2020, 10:10am UTC](https://discourse.julialang.org/t/gadfly-histogram-binwidth/49450 "2020-11-02T10:10:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [November 2, 2020, 10:10am UTC](https://discourse.julialang.org/t/gadfly-histogram-binwidth/49450/1 "2020-11-02T10:10:50Z")

</div>

How can I specify the binwidth in a Gadfly histogram? I don’t see it in [the docs](http://gadflyjl.org/stable/lib/statistics/#Gadfly.Stat.histogram).

---

<div class="post-metadata">

**Author:** ![Ayush\_Rawat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ayush_rawat/32/18961_2.png) [@Ayush\_Rawat](https://discourse.julialang.org/u/Ayush_Rawat)\
**Post date:** [November 2, 2020, 11:23am UTC](https://discourse.julialang.org/t/gadfly-histogram-binwidth/49450/2 "2020-11-02T11:23:26Z")

</div>

You can specify the bin count, as seen on [this docs page](http://gadflyjl.org/v0.5/lib/geoms/geom_histogram.html#Arguments-1).

Perhaps you could get the intended effects by calculating the count based on your x-axis.

Hope this helps. Feel free to post the code snippet you need help with, maybe it’ll enable us to provide better advice.

Cheers
