# Seeing double (displaying figures twice)

**URL:** <https://mne.discourse.group/t/seeing-double-displaying-figures-twice/11746>\
**Category:** Support & Discussions\
**Tags:** preprocessing, fnirs\
**Created:** [March 13, 2026, 11:25am UTC](https://mne.discourse.group/t/seeing-double-displaying-figures-twice/11746 "2026-03-13T11:25:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alice-in-coderland](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/alice-in-coderland/32/4666_2.png) [@alice-in-coderland](https://mne.discourse.group/u/alice-in-coderland)\
**Post date:** [March 13, 2026, 11:25am UTC](https://mne.discourse.group/t/seeing-double-displaying-figures-twice/11746/1 "2026-03-13T11:25:46Z")

</div>

- MNE version: 1.11.0
- MNE-NIRS version: 0.7.3
- operating system: macOS Tahoe 26.3
- environment: DataSpell 2025.3.2

Hello!  
I am just starting my adventure with fNIRS and MNE. I wanted to use a similar analysis pipeline for correlating behavioural and fNIRS time-series as this paper:

[https://doi.org/10.1177/0956797619878698](https://doi.org/10.1177/0956797619878698)

My first step is trying to setup a pipeline to inspect and preprocess data.

I have ran into a strange behaviour of the MNE package and I am not sure how to resolve these.

When I try to inspect the data, be it montage configuration or the od\_plot, the psd plot, or anything else, all the figures appear twice (double exactly the same figure).

My details:

The code I used is just the code from the tutorial:

```python
import matplotlib.pyplot as plt
import seaborn as sns

import mne

from mne.preprocessing.nirs import (
    optical_density,
)

# raw_intensity = mne.io.read_raw_nirx(fnirs_cw_amplitude_dir, verbose=False)
raw_intensity = mne.io.read_raw_snirf(' ***path to snirf file***', verbose=True)
raw_intensity.load_data().resample(3, npad="auto")
raw_od = optical_density(raw_intensity)

raw_od.plot(n_channels=32, duration=40, show_scrollbars=False,
            scalings=5e-2,
            )

```

```python
raw_od.plot_sensors(show_names=True)

```

```python
raw_od.compute_psd().plot(average=True)

```

1. Has anyone encountered this behaviour?
2. Does it affect anything else other than the visualisation output? Can I trust the numbers I get nevertheless?

Best,

Alicja

P.S. Outputs from other packages, matplotlib for example, appear normally.

---

<div class="post-metadata">

**Author:** ![PragnyaKhandelwal](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/pragnyakhandelwal/32/4640_2.png) [@PragnyaKhandelwal](https://mne.discourse.group/u/PragnyaKhandelwal)\
**Post date:** [March 13, 2026, 1:12pm UTC](https://mne.discourse.group/t/seeing-double-displaying-figures-twice/11746/2 "2026-03-13T13:12:54Z")

</div>

Hi @[alice-in-coderland](https://mne.discourse.group/u/alice-in-coderland), welcome to the MNE community!

MNE’s plotting functions return a “figure object.” In an interactive cell, DataSpell automatically captures and displays any object returned at the end of a line.

Maybe, this will work cuz ‘;’ will suppress the “return” output

raw\_od.plot(n\_channels=32, duration=40, show\_scrollbars=False);

You can 100% trust your numbers! This is purely a visualization artifact of the IDE and doesn’t affect the underlying data, the resampling, or the optical density calculations at all.

Good luck with your fNIRS pipeline!

---

<div class="post-metadata">

**Author:** ![alice-in-coderland](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/alice-in-coderland/32/4666_2.png) [@alice-in-coderland](https://mne.discourse.group/u/alice-in-coderland)\
**Post date:** [March 16, 2026, 1:44pm UTC](https://mne.discourse.group/t/seeing-double-displaying-figures-twice/11746/3 "2026-03-16T13:44:06Z")

</div>

Thank you @PragnyaKhandelwal , that worked!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 23, 2026, 1:44pm UTC](https://mne.discourse.group/t/seeing-double-displaying-figures-twice/11746/4 "2026-03-23T13:44:44Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
