# SetRangeUser not working well

**URL:** <https://root-forum.cern.ch/t/setrangeuser-not-working-well/38257>\
**Category:** ROOT\
**Tags:** graphics, python, root\
**Created:** [March 4, 2020, 3:27pm UTC](https://root-forum.cern.ch/t/setrangeuser-not-working-well/38257 "2020-03-04T15:27:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmaksimo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vmaksimo/32/20256_2.png) [@vmaksimo](https://root-forum.cern.ch/u/vmaksimo)\
**Post date:** [March 4, 2020, 3:27pm UTC](https://root-forum.cern.ch/t/setrangeuser-not-working-well/38257/1 "2020-03-04T15:27:10Z")

</div>

Hi all,

I`m making TMultiGraph with 3 graphs in pyroot.  
I need it to be with limits on the x-axis (490,538), so I add

g.GetXaxis().SetRangeUser(490,538)

and when draw it, one point (let`s call it a) that is a\<490 is shown on canvas also (see attached pic)  
How can I make it stop showing that point a?

 ![Screenshot from 2020-03-04 16-18-33](https://root-forum.cern.ch/uploads/default/original/3X/9/4/94918d0860b8efac5ea9a0d16f55bd44993d5ec1.png)

Thanks in advance,  
V.

---

<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:** [March 4, 2020, 3:28pm UTC](https://root-forum.cern.ch/t/setrangeuser-not-working-well/38257/2 "2020-03-04T15:28:30Z")

</div>

Can you provide a macro reproducing your problem ?

---

<div class="post-metadata">

**Author:** ![vmaksimo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vmaksimo/32/20256_2.png) [@vmaksimo](https://root-forum.cern.ch/u/vmaksimo)\
**Post date:** [March 4, 2020, 3:44pm UTC](https://root-forum.cern.ch/t/setrangeuser-not-working-well/38257/3 "2020-03-04T15:44:25Z")

</div>

Here is the macro …  
I had to paste arrays manualy since I`m getting them from some calculations from ntuple,  
thats why code looks like little messy[macro123.py](https://root-forum.cern.ch/uploads/short-url/vOzZMpgjZEjc4TtQ1eMcCYcX2ps.py) (10.9 KB)

---

<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:** [March 4, 2020, 5:04pm UTC](https://root-forum.cern.ch/t/setrangeuser-not-working-well/38257/4 "2020-03-04T17:04:01Z")

</div>

[macro123.C](https://root-forum.cern.ch/uploads/short-url/lLIkGu3TPRgXsb34qsK1duytbQO.C) (10.9 KB)

 ![Screenshot 2020-03-04 at 18.02.43](https://root-forum.cern.ch/uploads/default/original/3X/3/b/3b257b430b5290c8b2ba03ae34129ebffdc128d7.png)

---

<div class="post-metadata">

**Author:** ![vmaksimo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vmaksimo/32/20256_2.png) [@vmaksimo](https://root-forum.cern.ch/u/vmaksimo)\
**Post date:** [March 4, 2020, 5:16pm UTC](https://root-forum.cern.ch/t/setrangeuser-not-working-well/38257/5 "2020-03-04T17:16:58Z")

</div>

Thanks a lot couet… 😃  
You saved me.

All the best,  
V.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [March 18, 2020, 5:17pm UTC](https://root-forum.cern.ch/t/setrangeuser-not-working-well/38257/6 "2020-03-18T17:17:00Z")

</div>

Closed on March 18, 2020, 5:17pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
