# Spectrogram from ECoG

**URL:** https://mne.discourse.group/t/spectrogram-from-ecog/4941
**Category:** Support & Discussions
**Tags:** time-frequency, visualization
**Created:** [May 25, 2022, 7:05pm UTC](https://mne.discourse.group/t/spectrogram-from-ecog/4941 "2022-05-25T19:05:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mtaskiran](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mtaskiran](https://mne.discourse.group/u/mtaskiran)
#### Post date: [May 25, 2022, 7:05pm UTC](https://mne.discourse.group/t/spectrogram-from-ecog/4941/1 "2022-05-25T19:05:57Z")

</div>

Hi, I want to show the wavelengths with a spectrogram in the ECoG recording taken with bipolar electrodes. However, as I understand it, I need epoched data and events to be able to do this. I don’t have “stim channel” and events in my recordings. Can I spectrogram without these?

---

<div class="post-metadata">

### Author: ![alexrockhill](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/alexrockhill/32/31_2.png) [@alexrockhill](https://mne.discourse.group/u/alexrockhill)
#### Post date: [May 25, 2022, 10:23pm UTC](https://mne.discourse.group/t/spectrogram-from-ecog/4941/2 "2022-05-25T22:23:51Z")

</div>

You could use [mne.make\_fixed\_length\_epochs — MNE 1.1.dev0 documentation](https://mne.tools/dev/generated/mne.make_fixed_length_epochs.html?highlight=make_fixed_length#mne.make_fixed_length_epochs) and then compute the spectrograms on smaller sections. Or you could define one epoch that starts at the start of your `raw` object and goes the entire length of the recording.

---

<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: [May 26, 2022, 7:31am UTC](https://mne.discourse.group/t/spectrogram-from-ecog/4941/3 "2022-05-26T07:31:59Z")

</div>

You could take a look at the [`plot_spectrogram()` function in yasa](https://raphaelvallat.com/yasa/build/html/generated/yasa.plot_spectrogram.html), but it only works with one channel at a time.
