# 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:** 1\
**Showing post:** 2

<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).

---

_[View the full topic](https://root-forum.cern.ch/t/tcanvas-size/55519)._
