-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplotGaitKinematicsStroke.m
30 lines (27 loc) · 1.49 KB
/
plotGaitKinematicsStroke.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function plotGaitKinematicsStroke( ROM, subno,...
variable, titlestring, units )
% Produces bar plots of selected gait kinematic metric, in a unform way.
% inputs are data set structure with gait kenematic vectros for each
% treamdill session, the subject number (line in structure) the variable
% (entry in vector) and the title of the chart/variable name
figure, hold on
categ = categorical({'B', 'Pre-T', 'T', 'Post A', 'Post B', 'Post C'});
categ = reordercats(categ, {'B', 'Pre-T', 'T', 'Post A', 'Post B', 'Post C'});
b = bar( categ, [ ROM(subno).P(variable) ROM(subno).T(variable) ...
ROM(subno).A(variable) ROM(subno).Posta(variable) ...
ROM(subno).Postb(variable) ROM(subno).Postc(variable) ], 'w', ...
'LineWidth', 2.0 );
errorbar( categ, [ ROM(subno).P(variable) ROM(subno).T(variable) ...
ROM(subno).A(variable) ROM(subno).Posta(variable) ...
ROM(subno).Postb(variable) ROM(subno).Postc(variable) ], ...
[ ROM(subno).P(variable + 2) ROM(subno).T(variable + 2) ...
ROM(subno).A(variable + 2) ROM(subno).Posta(variable + 2) ...
ROM(subno).Postb(variable + 2 ) ROM(subno).Postc(variable + 2)], '.k', ...
'LineWidth', 2.0 );
% b.CData(1, :) = [ 0 1 0.8 ];
% b.CData(2, :) = [ 0 1 0.8 ];
% b.CData(3, :) = [ 0 1 0.8 ];
% b.CData(4:6, :) = [ 0 1 0.8 ];
title([titlestring, ' ' , num2str(subno) ]), ylabel( [titlestring units] )
set( gca, 'box', 'off', 'FontSize', 16.0, 'LineWidth', 2.0)
end