# Draw line instead of zigzag line

**URL:** <https://root-forum.cern.ch/t/draw-line-instead-of-zigzag-line/41420>\
**Category:** Newbie\
**Created:** [September 13, 2020, 8:14am UTC](https://root-forum.cern.ch/t/draw-line-instead-of-zigzag-line/41420 "2020-09-13T08:14:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Afzaal786](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/afzaal786/32/20527_2.png) [@Afzaal786](https://root-forum.cern.ch/u/Afzaal786)\
**Post date:** [September 13, 2020, 8:14am UTC](https://root-forum.cern.ch/t/draw-line-instead-of-zigzag-line/41420/1 "2020-09-13T08:14:22Z")

</div>

Hi want to draw line instead of zigzag line as here in attachment.!  
[Screenshot from 2020-09-13 13-02-28|690x387](https://root-forum.cern.ch/uploads/short-url/yYtv7YgY8UEZrko4CLdi5omeaI.png)

---

<div class="post-metadata">

**Author:** ![yus](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/9fc348/32.png) [@yus](https://root-forum.cern.ch/u/yus)\
**Post date:** [September 13, 2020, 12:04pm UTC](https://root-forum.cern.ch/t/draw-line-instead-of-zigzag-line/41420/2 "2020-09-13T12:04:58Z")

</div>

Hi Muhammad,

try drawing your histogram using

```auto
hist->Draw("C");

```

It will draw a smooth curve through the histogram bins.

---

<div class="post-metadata">

**Author:** ![Afzaal786](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/afzaal786/32/20527_2.png) [@Afzaal786](https://root-forum.cern.ch/u/Afzaal786)\
**Post date:** [September 13, 2020, 6:35pm UTC](https://root-forum.cern.ch/t/draw-line-instead-of-zigzag-line/41420/3 "2020-09-13T18:35:17Z")

</div>

Hi @yus I tried but it draw small circles at the top but not a smooth curve .

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [September 13, 2020, 6:44pm UTC](https://root-forum.cern.ch/t/draw-line-instead-of-zigzag-line/41420/4 "2020-09-13T18:44:25Z")

</div>

A histogram is a representation of counts; the line you see corresponds to the counts of how often each bin was filled. Changing the line means changing the histogram contents - which means showing not the data you have but data you believe to be better. The deviations from the “perfect line” are important, though - they give an indication what the uncertainty is.

I see two options:

- show a fit, i.e. a function that parameterizes your histogram.
- use larger bin widths; you can try for instance `hist->Rebin(4)`

Cheers, Axel.
