# Polar Color Graph

**URL:** <https://root-forum.cern.ch/t/polar-color-graph/29629>\
**Category:** ROOT\
**Created:** [July 3, 2018, 6:33pm UTC](https://root-forum.cern.ch/t/polar-color-graph/29629 "2018-07-03T18:33:24Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [July 8, 2018, 1:34pm UTC](https://root-forum.cern.ch/t/polar-color-graph/29629/16 "2018-07-08T13:34:54Z")

</div>

You are facing floating point “rounding errors” (coming mainly from bins’ edges calculation in ROOT).  
To understand it better, try to calculate e.g.:

```auto
((TMath::Pi()*5.)/3.) - ((TMath::Pi()/3.)*5.)

```

and try your macro with e.g.:

```auto
double slip = -1e-11; // try with -1e-11, 0, +1e-11
hist[0] = new TH2D("h1","h1",16, -TMath::TwoPi(), TMath::TwoPi() + slip, 8, -TMath::TwoPi(), TMath::TwoPi() + slip);
hist[1] = new TH2D("h2","h2", 8, -TMath::TwoPi(), TMath::TwoPi() + slip, 8, -TMath::TwoPi(), TMath::TwoPi() + slip);

```

---

_[View the full topic](https://root-forum.cern.ch/t/polar-color-graph/29629)._
