# TTree-\>Draw()

**URL:** <https://root-forum.cern.ch/t/ttree-draw/13818>\
**Category:** ROOT\
**Created:** [February 20, 2012, 1:36am UTC](https://root-forum.cern.ch/t/ttree-draw/13818 "2012-02-20T01:36:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew1](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/9de053/32.png) [@Andrew1](https://root-forum.cern.ch/u/Andrew1)\
**Post date:** [February 20, 2012, 1:36am UTC](https://root-forum.cern.ch/t/ttree-draw/13818/1 "2012-02-20T01:36:27Z")

</div>

Hi,

I have a TTree and I would like to draw a histogram of a variable with a given number of bins and a given range.

Doing

```auto

```

will draw the histogram with the given range. How do I specify the number of bins in the histogram?

Andrew

---

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [February 20, 2012, 8:02am UTC](https://root-forum.cern.ch/t/ttree-draw/13818/2 "2012-02-20T08:02:42Z")

</div>

See [url][The number of bins?](https://root-forum.cern.ch/t/the-number-of-bins/13553/1)
