# Plot root macro in SWAN console

**URL:** <https://root-forum.cern.ch/t/plot-root-macro-in-swan-console/55507>\
**Category:** Newbie\
**Created:** [July 1, 2023, 3:27pm UTC](https://root-forum.cern.ch/t/plot-root-macro-in-swan-console/55507 "2023-07-01T15:27:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mart](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mart/32/33819_2.png) [@Mart](https://root-forum.cern.ch/u/Mart)\
**Post date:** [July 1, 2023, 3:27pm UTC](https://root-forum.cern.ch/t/plot-root-macro-in-swan-console/55507/1 "2023-07-01T15:27:11Z")

</div>

\_ROOT Version: 6.28/00  
\_Platform: SWAN

* * *

I tried to execute the following in SWAN console:

```auto
root [0] TF1 f1("f1","sin(x)/x",0.,10.);
root [1] f1.Draw();

```

And I get:

```auto
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1

```

I tried already:

```auto
gPad->Draw()

```

and

```auto
c1.Draw()

```

and

```auto
ROOT.gPad.Draw()

```

How can I see the plot I have created? Would somebody be so kind and help me find it?

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [July 1, 2023, 4:21pm UTC](https://root-forum.cern.ch/t/plot-root-macro-in-swan-console/55507/2 "2023-07-01T16:21:17Z")

</div>

Hi Marta,

Sorry, I misread what you wrote! You’re probably using the console / terminal in SWAN? That doesn’t have graphics. Instead please open a new Notebook (Python or C++).

Axel

---

<div class="post-metadata">

**Author:** ![Mart](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mart/32/33819_2.png) [@Mart](https://root-forum.cern.ch/u/Mart)\
**Post date:** [July 2, 2023, 11:04am UTC](https://root-forum.cern.ch/t/plot-root-macro-in-swan-console/55507/3 "2023-07-02T11:04:48Z")

</div>

Thank you a lot. I copy that! Have a good day!
