Skip to content

Commit

Permalink
bug in GUI and prettification of figure code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Bach committed Oct 28, 2024
1 parent 740be79 commit b7b6aac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/pspm_cfg/pspm_cfg_selector_data_design.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
end
% marker channel
if isfield(job.timeunits, 'markers')
options.marker_chan_num = pspm_cfg_channel_selector('run', job.timeunits.markers.chan);
options.marker_chan_num = pspm_cfg_selector_channel('run', job.timeunits.markers.chan);
end
out1 = model;
out2 = options;
Expand Down
14 changes: 8 additions & 6 deletions src/pspm_review.m
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ function buttonPlot6_Callback(hObject, ~, handles)
glm = handles.modelData{handles.currentModel}.model;
sr = glm.input.sr;
cmap = lines(numel(segments.segments));
figure;
f.h = figure;
f.a.h = axes(f.h);
hold on;

legendNames = cell(1, numel(segments.segments));
Expand All @@ -336,16 +337,17 @@ function buttonPlot6_Callback(hObject, ~, handles)

plotdata = segments.segments{x}.mean;
t = (1:length(plotdata)) / sr;
plot(t, plotdata, 'Color', cmap(x, :), 'LineWidth', 1);
f.a.p = plot(f.a.h, t, plotdata, 'Color', cmap(x, :), 'LineWidth', 1);
legendNames{x} = segments.segments{x}.name;

end

legend(legendNames, 'Interpreter', 'none', 'Location', 'best');
f.a.l = legend(legendNames, 'Interpreter', 'none', 'Location', 'best');
legend boxoff

xlabel('Time seconds');
ylabel('Mean Response');
title('Mean Responses for All Segments');
set(get(f.a.h, 'xlabel'), 'String', 'Time (seconds)');
set(get(f.a.h, 'ylabel'), 'String', 'Mean Response (data units)');
set(get(f.a.h, 'title'), 'String', 'Mean Responses for All Segments');

hold off;
end
Expand Down

0 comments on commit b7b6aac

Please sign in to comment.