# TGraph set maximum number of digits not working

**URL:** <https://root-forum.cern.ch/t/tgraph-set-maximum-number-of-digits-not-working/49928>\
**Category:** Newbie\
**Created:** [May 10, 2022, 3:48pm UTC](https://root-forum.cern.ch/t/tgraph-set-maximum-number-of-digits-not-working/49928 "2022-05-10T15:48:48Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [May 11, 2022, 6:38am UTC](https://root-forum.cern.ch/t/tgraph-set-maximum-number-of-digits-not-working/49928/6 "2022-05-11T06:38:20Z")

</div>

```auto
root [0] auto c = new TCanvas()
root [1] c->DrawFrame(0.5,9.,7.5,9.5)
root [2] hframe->GetYaxis()->SetDecimals(2)

```

 ![Screenshot 2022-05-11 at 08.37.08](https://root-forum.cern.ch/uploads/default/original/3X/a/3/a399ae1dbccdc20efb7e914b141fc55de29e19c5.png)

---

_[View the full topic](https://root-forum.cern.ch/t/tgraph-set-maximum-number-of-digits-not-working/49928)._
