# raw.plot scaling changes after 1 second of data

**URL:** <https://mne.discourse.group/t/raw-plot-scaling-changes-after-1-second-of-data/4286>\
**Category:** Support & Discussions\
**Created:** [January 17, 2022, 9:33pm UTC](https://mne.discourse.group/t/raw-plot-scaling-changes-after-1-second-of-data/4286 "2022-01-17T21:33:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olof](https://avatars.discourse-cdn.com/v4/letter/o/c57346/32.png) [@Olof](https://mne.discourse.group/u/Olof)\
**Post date:** [January 17, 2022, 9:33pm UTC](https://mne.discourse.group/t/raw-plot-scaling-changes-after-1-second-of-data/4286/1 "2022-01-17T21:33:06Z")

</div>

Hi there,

I’m trying to plot filtered raw MEG data to figure out which channels are bad. Unfortunately, for some participants the plots show 1 second of ‘normally’ scaled data, but after that basically show the data in a very different scale. This is the case for a few participants, which makes me wonder if there is a structural setting that needs to be tweaked or if the data needs to be handled in some way before plotting the raw signal.

Does anyone know what is going on here or do you have some tips?

Best,

Olof

- MNE version: e.g. 0.20.0
- operating system: e.g. macOS 11.6

 ![Screenshot 2022-01-17 at 22.28.15](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/b/b0492a7d565456e16d74b69c63ac027004e4f979.jpeg)

---

<div class="post-metadata">

**Author:** ![cbrnr](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/cbrnr/32/1409_2.png) [@cbrnr](https://mne.discourse.group/u/cbrnr)\
**Post date:** [January 18, 2022, 8:53am UTC](https://mne.discourse.group/t/raw-plot-scaling-changes-after-1-second-of-data/4286/2 "2022-01-18T08:53:32Z")

</div>

Can you rule out that this is what’s actually in the data? Can you share such a problematic file?

---

<div class="post-metadata">

**Author:** ![mmagnuski](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/mmagnuski/32/153_2.png) [@mmagnuski](https://mne.discourse.group/u/mmagnuski)\
**Post date:** [January 18, 2022, 12:21pm UTC](https://mne.discourse.group/t/raw-plot-scaling-changes-after-1-second-of-data/4286/3 "2022-01-18T12:21:52Z")

</div>

I agree with @cbrnr - this looks to be the actual signal. You can verify that by plotting a few seconds of the signal using plain matplotlib:

```python
import matplotlib.pyplot as plt

ch_idx = 10
max_sample = 4000
plt.plot(raw.times[:max_sample], raw._data[ch_idx , :max_sample])

```

---

<div class="post-metadata">

**Author:** ![Olof](https://avatars.discourse-cdn.com/v4/letter/o/c57346/32.png) [@Olof](https://mne.discourse.group/u/Olof)\
**Post date:** [January 18, 2022, 7:37pm UTC](https://mne.discourse.group/t/raw-plot-scaling-changes-after-1-second-of-data/4286/4 "2022-01-18T19:37:01Z")

</div>

Thanks for your answers.

I think its the actual signal:

 ![Figure_1](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/1/123e77709a4b13025a8fd344971c86a54b7eb7f1.png)

Not sure what’s going on here. It’s consistently present from about 1 second of the recording until the end of the file, in this participant and a couple of others. I’ve tried to filter the data in various ways and to look around online but I can’t find a reason yet.

---

<div class="post-metadata">

**Author:** ![drammock](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/drammock/32/4_2.png) [@drammock](https://mne.discourse.group/u/drammock)\
**Post date:** [January 18, 2022, 10:56pm UTC](https://mne.discourse.group/t/raw-plot-scaling-changes-after-1-second-of-data/4286/5 "2022-01-18T22:56:49Z")

</div>

were there HPI coils that got turned on about 1 second into the recording, perhaps? `mne.chpi.filter_chpi` might help.

---

<div class="post-metadata">

**Author:** ![Olof](https://avatars.discourse-cdn.com/v4/letter/o/c57346/32.png) [@Olof](https://mne.discourse.group/u/Olof)\
**Post date:** [January 19, 2022, 12:39pm UTC](https://mne.discourse.group/t/raw-plot-scaling-changes-after-1-second-of-data/4286/6 "2022-01-19T12:39:46Z")

</div>

> [@drammock](#):
>
> mne.chpi.filter\_chpi

Thanks a lot Dan, that did the trick!
