question about mne.viz.plot_events()

now I use mne.viz.plot_events() to plot my data like this:


how can I switch the Y-axls, become this:
image

Hello, plot_events is meant to plot the content of the events array, no more and no less.

You’ll have to manually create the kind of figure you’re interested in, as there is no built-in way in MNE to generate it.

Best wishes,
Richard

if I want to create this image by matplotlib, is there to get an array which records the power and time?

I’m not sure I understand that question? Do you have or do you not have the data you want to plot? If you do not have it yet, why would you assume that MNE knows what you want? If you do have the data, what exactly is it that’s posing a problem for you? I must be missing something :slight_smile:

sorry for didn’t make it clear.
I have some .cnt files, and now I want to visualize them through power and trials( like the pic above)
however I only know how to deal with the .cnt data through mne, after write data in epochs and picks, I don’t know how to plot like what I need, (like you said, I need to create by myself through other tools)
Then I need an data array to visualize(which like epochs, or sth else) does mne has a algorithm which saves these data and can be read?

Sorry this is still very blurry to me. So you have some data and you calculated PSD on the data on the epochs level? Using MNE? And now you want to plot it the way shown in the figure above?

Can you please share the code you have so far so we have something concrete to look at? Thanks.

dongyangTHU/2022SCNS3 (github.com)
I uploaded here, thanks for your effort!

The link doesn’t work.

Could you please share a minimal example of what you’re doing here on the forum?

Thanks.