Biomech-Sim-Toolbox 1
Toolbox for movement simulation and analysis
Loading...
Searching...
No Matches
Functions
plotVarType.m File Reference

Function to plot one type of variable of a variables table. More...

Functions

function plotVarType (in varTable, in style, in standing_r, in standing_l)
 Function to plot one type of variable of a variables table.
 

Detailed Description

Function to plot one type of variable of a variables table.

Details: plotVarType()

Author
Marlies Nitschke
Date
July, 2021

Function Documentation

◆ plotVarType()

function plotVarType ( in  varTable,
in  style,
in  standing_r,
in  standing_l 
)

Function to plot one type of variable of a variables table.

Default values of the fields of style:

style.figureSize = [0 0 16 20]; % in cm
style.xLabelText = 'Gait Cycle in \%';
style.xLabelFontSize = 10;
style.yLabelFontSize = 10;
style.xTickFontSize = 11;
style.yTickFontSize = 11;
style.legendFontSize = 9;
style.lineWidth = 0.5;
style.simColor = 'k'; % or a rgb vector
style.trackColor = 'r--'; % or a rgb vector
style.extraColor = 'k--'; % or a rgb vector
style.trackFaceAlpha = 0.1;
style.extraFaceAlpha = 0.1;
style.standingRightColor = 'k';
style.standingLeftColor = 'k';
style.standingFaceAlpha = 0.1;
style.subFigSettings.nCol = 2;
style.subFigSettings.width = 5; % in cm
style.subFigSettings.height = 3.5; % in cm
style.subFigSettings.originUp = 4; % in cm
style.subFigSettings.originRight = 2; % in cm
style.subFigSettings.oneUp = 1.5; % in cm
style.subFigSettings.oneRight = 2.5; % in cm

The default values showed to work well when using the figure for DIN A4. It might however not be well suited for your screen or your purposes. Especially the option nCol might be useful.

Parameters
varTableTable: Table containing the data of ONE type of variable with the following columns:
  • type
  • name
  • unit
  • direction (only required for acc, gyro and marker data)
  • sim (optional)
  • simVar (optional)
  • mean (optional)
  • var (optional)
  • mean_extra (optional)
  • var_extra (optional)
The data of the available columns will be plotted.
style(optional) Struct: Style of the figure defined by variouse optional fields (see description above). If a field is not defined, default values specified in the description above will be used. If the content of multiple function calls should be plotted in the same figures, additionally the field "nSubFig" has to be specified with the number of subfigures. Use empty to skip the input.
standing_r(optional) Double vector: Stance phase of right foot with 0: no standing; 1: standing (size of other data) Use empty vector to skip it.
standing_l(optional) Double vector: Stance phase of left foot with 0: no standing; 1: standing (size of other data)
Return values
hFigHandle of figure @retvl style Struct: Style of figure containing all fields