# Scaling histogram and filling

**URL:** <https://root-forum.cern.ch/t/scaling-histogram-and-filling/41459>\
**Category:** Newbie\
**Tags:** hist, root\
**Created:** [September 15, 2020, 9:24pm UTC](https://root-forum.cern.ch/t/scaling-histogram-and-filling/41459 "2020-09-15T21:24:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris1](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/ac91a4/32.png) [@Chris1](https://root-forum.cern.ch/u/Chris1)\
**Post date:** [September 15, 2020, 9:24pm UTC](https://root-forum.cern.ch/t/scaling-histogram-and-filling/41459/1 "2020-09-15T21:24:08Z")

</div>

I am measureing some radiation, and i want to subtract a measured background radiation from my histogram. The background is not measured over the same length of time, so i need to scale it up before i can subtract.

i tried:  
hist-\>scale(foo);

but this also scales the errors (that is set by default) and the pehibits me from setting the fill of the background hist:  
hist\_bg-SetFillColor(kRed);

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [September 16, 2020, 7:34am UTC](https://root-forum.cern.ch/t/scaling-histogram-and-filling/41459/2 "2020-09-16T07:34:11Z")

</div>

@couet Perhaps you can help?

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [September 16, 2020, 7:38am UTC](https://root-forum.cern.ch/t/scaling-histogram-and-filling/41459/3 "2020-09-16T07:38:38Z")

</div>

An histogram with error bars in its data structure is, by default, drawn with errors bars. If you want to draw it without use:

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

```

Then `SetFillColor` will be active.
