Plotting EEG data too big and scroll does not work

Hi,

I am currently plotting my EEG data, yet it looks like this. I cannot even scroll my mouse.

I would like to appear in a small signal as shown on the [website] so that it is easier to see (Working with events — MNE 0.23.dev0 documentation). As you can see below. Could anyone give me some help, please?

I am currently using MNE-Python 0.22
Using windows

Thanks for your help
Ihshan

you can press - the shortcut to reduce the scaling in the plot

maybe your data in raw are stored in uV and not V as required by MNE

Alex

By default, traces are not shown if they exceed a certain amplitude limit (clipping).
You can try to disable clipping by doing

raw.plot(..., clipping=None)

If that’s the case, you can also override the default scaling factors and ensure that the largest fraction of data is shown without clipping automatically by doing:

raw.plot(..., scalings='auto')
1 Like

Thank you very much guys for your help. It works now.

Cheers

How can convert from uV to V then ?

It should ideally be scaled correctly during reading. What data format is that? MNE tries to scale everything correctly automatically, but maybe there is a bug in the specific reader somewhere…

I am able to adjust the signal now. Yet it still says that in uV. Kindly see the picture below, black circle. I uploaded the raw data in CSV format.
Should I change my file not in CSV format ? what is the best format to work with then ?

How are you loading the data, precisely?

It looks to me as if the original scaling is in nV, even!

Kindly see my code below for uploading the data

# Import data
rawData = genfromtxt('EEG-S1.csv', delimiter=',')
dataCut = np.delete(rawData,np.s_[0:2],axis=1)
dataCut = np.transpose(dataCut)

# Creating Info
info = mne.create_info(
        ch_names = ['FP1','FP2','F7', 'F3', 'F4','F8', 'T7',
                    'C3', 'C4', 'T8', 'P7','P3', 'P4','P8', 'O1','O2'],
        sfreq    =  220,
        ch_types=  'eeg')
raw = mne.io.RawArray(dataCut,info,verbose='info')

# Plotting raw data together with events
raw.plot(events=events_all, start= 5, duration=3, color='red', clipping=None, scalings='auto',
        event_color={1: 'r', 2:'g', 3:'b'})

I then use raw for the next code…
Does it sound good ?

Since you’re reading a custom file format and not relying on a built-in reader of MNE (why is that, anyway?), you need to ensure the data is scaled to Volts before creating the RawArray. I would assume either dataCut *= 1e-6 or dataCut *= 1e-9 should do it, depending on whether the data are currently stored as μV or nV.

Hi Richard,

That is the only way that I know how to upload CSV file format. I am using OpenBCI cap which resulted in CSV file. Do you have any suggestion what would be the best way of reading CSV by using a built-in reader of MNE then ? please advise !

If we use the built-in reader of MNE, will the data be scalled to Volts automatically ?

I believe OpenBCI uses μV for data storage. Simply multiply by 1e-6 to convert to Volts, and you should be fine. :sunglasses: I don’t think we have an OpenBCI reader yet. Could be interesting to add one, though!

I just read somewhere that OpenBCI can also export the data in BDF+ format. This can then be read by MNE-Python directly.

That would be great if it can be added as well.

OpenBCI now moves to Brainflow module, which I have no idea yet whether it can produce output file in EDF or BDF format. Previously, with GUI openBCI you can produce BDF file format as output.

I will multiply with 1e-6 then

Thanks