# TCanvas size

**URL:** <https://root-forum.cern.ch/t/tcanvas-size/55519>\
**Category:** General Chat\
**Created:** [July 3, 2023, 3:30am UTC](https://root-forum.cern.ch/t/tcanvas-size/55519 "2023-07-03T03:30:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kensugi](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/k/82dd89/32.png) [@kensugi](https://root-forum.cern.ch/u/kensugi)\
**Post date:** [July 3, 2023, 3:30am UTC](https://root-forum.cern.ch/t/tcanvas-size/55519/1 "2023-07-03T03:30:01Z")

</div>

Dear developers

My mac has ROOT6.28/04 via Homebrew. Today, I’d like to ask about the changes of TCanvas specifications. In the old version (ROOT6.26/06), TCanvas without Editor maybe has the dimensions of 600 x 600 if I define TCanvas as

> TCanvas\* c0 = new TCanvas(“c0”, “c0", 30, 30, 600, 600)

(tcanvas\_wo\_editor.png). However, currently, the size of Editor is included in TCanvas size when I set

> TCanvas\* c0 = new TCanvas(“c0”, “c0", 30, 30, 600, 600)  
> c0-\>ToggleEditor()

(tcanvas\_w\_editor.png). It became harder to depict graph with square size. Thus, I’d love to get the old specs, again (in my opinion).

Best, KS.

 ![tcanvas_w_editor](https://root-forum.cern.ch/uploads/default/original/3X/4/d/4d72eeb5ce4de6327678f343984826586e0f7335.jpeg)  
 ![tcanvas_wo_editor](https://root-forum.cern.ch/uploads/default/original/3X/c/0/c0b17699f50a9f781e9b0c839ae2586e698462ef.jpeg)

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [July 3, 2023, 3:52am UTC](https://root-forum.cern.ch/t/tcanvas-size/55519/2 "2023-07-03T03:52:04Z")

</div>

```auto
TCanvas* c0 = new TCanvas("c0", "c0", 30, 30, 600, 600);

```

this defines the _window_ size, not the _canvas_ size. To control the canvas size, you need to add

```auto
c0->SetCanvasSize(yourwidth,yourheight);

```

see the [Documentation](https://root.cern/doc/master/classTCanvas.html).

---

<div class="post-metadata">

**Author:** ![kensugi](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/k/82dd89/32.png) [@kensugi](https://root-forum.cern.ch/u/kensugi)\
**Post date:** [July 3, 2023, 4:06am UTC](https://root-forum.cern.ch/t/tcanvas-size/55519/3 "2023-07-03T04:06:57Z")

</div>

Thank you.

I checked the Documentation. I understand.

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [July 3, 2023, 1:57pm UTC](https://root-forum.cern.ch/t/tcanvas-size/55519/4 "2023-07-03T13:57:33Z")

</div>

See also one issue with tcanvas size [TCanvas size is inconsistent in batch vs non-batch mode · Issue #11004 · root-project/root · GitHub](https://github.com/root-project/root/issues/11004)
