# SetRangeUser doesn't work well

**URL:** <https://root-forum.cern.ch/t/setrangeuser-doesnt-work-well/14774>\
**Category:** ROOT\
**Created:** [August 15, 2012, 11:05pm UTC](https://root-forum.cern.ch/t/setrangeuser-doesnt-work-well/14774 "2012-08-15T23:05:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [August 16, 2012, 9:16am UTC](https://root-forum.cern.ch/t/setrangeuser-doesnt-work-well/14774/2 "2012-08-16T09:16:10Z")

</div>

Try:  
MyGraph-\>GetXaxis()-\>SetLimits(xmin, xmax);  
MyGraph-\>GetYaxis()-\>SetRangeUser(ymin, ymax);  
or:  
MyGraph-\>GetXaxis()-\>SetLimits(xmin, xmax);  
MyGraph-\>GetHistogram()-\>SetMinimum(ymin);  
MyGraph-\>GetHistogram()-\>SetMaximum(ymax);

See also [url][Drawing a TGraphAsymmErrors](https://root-forum.cern.ch/t/drawing-a-tgraphasymmerrors/14205/1) and [url][SetAxisRange(0.0,1.0,"Y"); is ineffective](https://root-forum.cern.ch/t/setaxisrange-0-0-1-0-y-is-ineffective/14040/1)

---

_[View the full topic](https://root-forum.cern.ch/t/setrangeuser-doesnt-work-well/14774)._
