37 lines
1.2 KiB
Matlab
37 lines
1.2 KiB
Matlab
function[e] = setPlotOptions(varargin)
|
|
|
|
plotwindow = gcf;
|
|
plotwindow_id = get_plotwindow_id(plotwindow);
|
|
|
|
options = get(plotwindow, 'UserData')
|
|
e = varargin{1};
|
|
jEventData = varargin{2};
|
|
hListbox = varargin{3};
|
|
|
|
variables = {'raw', 'logtransformed', 'interpolated', 'filtered', 'blinks', 'markers', 'labels','baseline', 'baseline_corrected', 'deconvolution'};
|
|
items = get(jEventData, 'CheckedIndicies');
|
|
|
|
non_items = setdiff(0:length(variables)-1, items);
|
|
for i = 1:length(items)
|
|
eval(['options.' variables{items(i)+1} '=1;']);
|
|
end
|
|
|
|
for i = 1:length(non_items)
|
|
eval(['options.' variables{non_items(i)+1} '=0;']);
|
|
end
|
|
|
|
set(plotwindow, 'UserData', options);
|
|
|
|
subj_pop = findobj('Tag',['subj_pop.' plotwindow_id]);
|
|
sess_pop = findobj('Tag',['sess_pop.' plotwindow_id]);
|
|
trial_edit = findobj('Tag', ['trial_edit.' plotwindow_id]);
|
|
|
|
tmpsubj=get(subj_pop, 'Value');
|
|
if (iscell(tmpsubj)), selsubj = tmpsubj{1}; else selsubj = tmpsubj;end;
|
|
tmpsess=get(sess_pop, 'Value');
|
|
if (iscell(tmpsubj)), selsess = tmpsess{1}; else selsess = tmpsess;end;
|
|
tmptrial=get(trial_edit, 'String');
|
|
if (iscell(tmptrial)), seltrial = str2num(tmptrial{1}); else seltrial = str2num(tmptrial);end;
|
|
|
|
plot(e.subjects(selsubj).sessions(selsess).trials(seltrial), e.settings);
|