Filter löschen
Filter löschen

How can I label my EEG-data plotting in gui?

6 Ansichten (letzte 30 Tage)
Jennifer Fox
Jennifer Fox am 12 Dez. 2016
Bearbeitet: David J. Mack am 12 Jan. 2017
atm I am working on some EEG-data. I am about to make a window where the user can plot several neurodata (about 60 channels) and zoom in to take a closer look at a channel and erase it. To be able to erase it the user has to click and the popup menu which channel he wants to delete. How can I label all 60 channels so one can read the label all over the (e.g.) 1500ms and zoom in in gui?
Thanks for any helpful answer

Antworten (1)

David J. Mack
David J. Mack am 12 Jan. 2017
Bearbeitet: David J. Mack am 12 Jan. 2017
Is your data all in the same axes or in separate subplot s? In the first case use the text function and set its 'Unit' property to 'normalized' which will show the label in the same place regardless of zoom (e.g. w.r.t. the axes instead of the data). Here is a short example:
text(50,0.5,'text in data space')
set(text(50,0.6,'text in axes space'),'Units','normalized') %Place the text in the same location & then switch units)
If you use the zoom tool you will see the difference.
Assuming you want to label n<100 channels according to "chXX" and their y-locations are given in vector y, then:
labels = strcat({'ch'},num2str((1:n)','%02d'));
x = repmat(min(xlim(gca)),size(y));
puts the labels at the left border of the current axes.
Greetings, David

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by