# Hidding a part of PSD plot

**URL:** <https://mne.discourse.group/t/hidding-a-part-of-psd-plot/7615>\
**Category:** Support & Discussions\
**Created:** [October 5, 2023, 3:43pm UTC](https://mne.discourse.group/t/hidding-a-part-of-psd-plot/7615 "2023-10-05T15:43:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hugues1273](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/hugues1273/32/2423_2.png) [@Hugues1273](https://mne.discourse.group/u/Hugues1273)\
**Post date:** [October 5, 2023, 3:43pm UTC](https://mne.discourse.group/t/hidding-a-part-of-psd-plot/7615/1 "2023-10-05T15:43:24Z")

</div>

Dear all,

I am currently doing EEG experiments. I am in Europe (France) and classically, an artifact appears at 50 HZ due to the environment. Therefore, this artifact appears also on my PSD plot. How could I replace it by a blank space?

Thank you for your help!

Hugues

 ![Figure_3](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/7/7a237835960c99946d75840b01cffa7a829b8b22.png)

---

<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:** [October 5, 2023, 5:15pm UTC](https://mne.discourse.group/t/hidding-a-part-of-psd-plot/7615/2 "2023-10-05T17:15:18Z")

</div>

You could apply a notch filter before plotting the PSD. This won’t add a blank space, but remove the peak around 50 Hz.

---

<div class="post-metadata">

**Author:** ![sotpapad](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sotpapad/32/2184_2.png) [@sotpapad](https://mne.discourse.group/u/sotpapad)\
**Post date:** [October 6, 2023, 10:27am UTC](https://mne.discourse.group/t/hidding-a-part-of-psd-plot/7615/3 "2023-10-06T10:27:51Z")

</div>

I don’t see why you would need that, but if you absolutely have to, `matplotlib` handles `NAN` as “blanks”. You could probably get the data, replace the values around the frequency window that you wish to hide with `NAN` and try plotting again.
