# Ploting with dual monitors

**URL:** <https://root-forum.cern.ch/t/ploting-with-dual-monitors/49306>\
**Category:** Newbie\
**Tags:** graphics, root\
**Created:** [March 22, 2022, 1:29pm UTC](https://root-forum.cern.ch/t/ploting-with-dual-monitors/49306 "2022-03-22T13:29:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hvsouza](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hvsouza/32/23711_2.png) [@hvsouza](https://root-forum.cern.ch/u/hvsouza)\
**Post date:** [March 22, 2022, 1:29pm UTC](https://root-forum.cern.ch/t/ploting-with-dual-monitors/49306/1 "2022-03-22T13:29:52Z")

</div>

Hi all,

I am currently using two monitors. Is it possible to create Canvas only in the monitor I am using?  
Currently, If I have the terminal open in my second monitor and I run a script, all canvas are being created in the primary monitor.  
(changing who is the primary monitor is not a good solution).

Best regards,  
Henrique

* * *

_ROOT Version:_ 6.24/06  
_Platform:_ Ubuntu 21.10 impish (x86-64)  
_Compiler:_ (gcc/g++ 11.2.0)

* * *

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [March 22, 2022, 2:12pm UTC](https://root-forum.cern.ch/t/ploting-with-dual-monitors/49306/3 "2022-03-22T14:12:54Z")

</div>

You can give coordinates to your canvas at creation time. See [TCanvas::TCanvas(const char \*name, const char \*title, Int\_t wtopx, Int\_t wtopy, Int\_t ww, Int\_t wh)](https://root.cern.ch/doc/master/classTCanvas.html#abd408a70837eae7593f20710b20b0ca1)

---

<div class="post-metadata">

**Author:** ![hvsouza](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hvsouza/32/23711_2.png) [@hvsouza](https://root-forum.cern.ch/u/hvsouza)\
**Post date:** [March 22, 2022, 2:56pm UTC](https://root-forum.cern.ch/t/ploting-with-dual-monitors/49306/4 "2022-03-22T14:56:18Z")

</div>

That worked, thanks!

Just to document here if anyone searches:  
I am using two monitors, each set with a resolution of 1920x1080. Therefore, if I want to plot the graph on the right sided monitor (full screen) one can do:  
TCanvas \*c1 = new TCanvas(“c1”,“c1”,1920,0,1920,1080);

Thanks again,  
Henrique
