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

Function to get the position of a subfigure. More...

Functions

function getSubfigurePosition (in iFig, in nRow, in nCol, in subFigSettings)
 Function to get the position of a subfigure.
 

Detailed Description

Function to get the position of a subfigure.

Details: getSubfigurePosition()

Author
Marlies Nitschke
Date
September, 2018

Function Documentation

◆ getSubfigurePosition()

function getSubfigurePosition ( in  iFig,
in  nRow,
in  nCol,
in  subFigSettings 
)

Function to get the position of a subfigure.

If you want to have a defined spacing between subfigures (e.g. to export it into tikz for a publication), this function can compute the positions of the subfigures for you.

This function can be used like the following to set the position of a subfigure:

set(hSub, 'Unit', 'centimeters', 'Position', getSubfigurePosition(iAng, nRow, nCol, subFigSettings));
function getSubfigurePosition(in iFig, in nRow, in nCol, in subFigSettings)
Function to get the position of a subfigure.

During this call, you have to set the unit which was also used in subFigSettings.

Parameters
iFigDouble: Index of the subfigure
nRowDouble: Number of rows in the figure
nColDouble: Number of columns in the figure
subFigSettingsStruct: Containing the settings to place the subfigures in the fields: width, height, originRight, originUp, oneRight, and oneUp.
Return values
posDouble vector: [left, bottom, width, height]