# Plot closes immediately

**URL:** <https://mne.discourse.group/t/plot-closes-immediately/4033>\
**Category:** Support & Discussions\
**Tags:** visualization, epochs, raw\
**Created:** [November 26, 2021, 2:45pm UTC](https://mne.discourse.group/t/plot-closes-immediately/4033 "2021-11-26T14:45:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![APPLE](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/apple/32/1016_2.png) [@APPLE](https://mne.discourse.group/u/APPLE)\
**Post date:** [November 26, 2021, 2:45pm UTC](https://mne.discourse.group/t/plot-closes-immediately/4033/1 "2021-11-26T14:45:14Z")

</div>

I have one other question to ask that when I use “raw.plot” the figure generated gone at once…

---

<div class="post-metadata">

**Author:** ![mscheltienne](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/mscheltienne/32/827_2.png) [@mscheltienne](https://mne.discourse.group/u/mscheltienne)\
**Post date:** [November 26, 2021, 2:46pm UTC](https://mne.discourse.group/t/plot-closes-immediately/4033/2 "2021-11-26T14:46:58Z")

</div>

We are going to need a lot more detail to help you out. For instance, what is the traceback in the console? What is the output of `mne.sys_info()`?

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [November 26, 2021, 3:44pm UTC](https://mne.discourse.group/t/plot-closes-immediately/4033/3 "2021-11-26T15:44:19Z")

</div>

A post was split to a new topic: [Getting data from a single channel](https://mne.discourse.group/t/getting-data-from-a-single-channel/4034)

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [November 26, 2021, 3:42pm UTC](https://mne.discourse.group/t/plot-closes-immediately/4033/4 "2021-11-26T15:42:28Z")

</div>

Hello @APPLE and welcome to the forum!

Please always create a new topic for new questions. I have moved your second question to this new topic here.

Best wishes,  
Richard

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [November 26, 2021, 3:47pm UTC](https://mne.discourse.group/t/plot-closes-immediately/4033/5 "2021-11-26T15:47:07Z")

</div>

The following posting can possibly provide some help:

> [@Why does using a different IDE affect my raw.plot()?](https://mne.discourse.group/t/why-does-using-a-different-ide-affect-my-raw-plot/2770/2):
>
> Hello, The Python interpreter closes immediately after opening the plot window, because the end of your script is reached. You have two ways to work around this: Ensure execution is halted after plotting by passing block=True, i.e. raw.plot(block=True) Or edit your PyCharm run configuration such that your script is run in interactive mode (which might be something you want when working with data interactively anyway!) by ticking the “Run with Python Console” box. See [Create and edit run/debu…](https://www.jetbrains.com/help/pycharm/creating-and-editing-run-debug-configurations.html)

---

<div class="post-metadata">

**Author:** ![APPLE](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/apple/32/1016_2.png) [@APPLE](https://mne.discourse.group/u/APPLE)\
**Post date:** [November 26, 2021, 3:48pm UTC](https://mne.discourse.group/t/plot-closes-immediately/4033/6 "2021-11-26T15:48:29Z")

</div>

Thanks! I’ll comply with the rule.
