NeuroTechX / EEG-ExPy

EEG Experiments in Python
https://neurotechx.github.io/EEG-ExPy/
BSD 3-Clause "New" or "Revised" License
435 stars 124 forks source link

Legend items order when using diff_waveform in plot_conditions #226

Open sotofernando opened 1 year ago

sotofernando commented 1 year ago

ℹ Computer information

📝 Provide detailed reproduction steps (if any)

  1. Run examples/visual_p300/01r__p300_viz.py

✔️ Expected result

image

I think is just changing order when concatenating lists in https://github.com/NeuroTechX/eeg-notebooks/blob/master/eegnb/analysis/utils.py#L307

Instead of:

        legend = ["{} - {}".format(diff_waveform[1], diff_waveform[0])] + list(
            conditions.keys()
        )

could be something like: legend = list(conditions.keys()) + ["{} - {}".format(diff_waveform[1], diff_waveform[0])]

❌ Actual result

image

📷 Screenshots

To check and identify wave forms and legend items, I compared with Alexandre's article in: http://alexandre.barachant.org/blog/2017/02/05/P300-with-muse.html

image

pellet commented 1 year ago

I've had a similar issue with visualizing the N170 example data data: image (2)

The issue is not occurring when reverting eeg-notebooks back to the revision which is using seaborn v0.9.0 for line plotting - before develop was merged to master