Biomech-Sim-Toolbox 1
Toolbox for movement simulation and analysis
|
Function to add the legend for a plot. More...
Functions | |
function | addLegend (in allHandels, in allEntries, in allFaceAlphas, in legendFontSize) |
Function to add the legend for a plot. | |
function addLegend | ( | in | allHandels, |
in | allEntries, | ||
in | allFaceAlphas, | ||
in | legendFontSize | ||
) |
Function to add the legend for a plot.
By default, Matlab does not set a face alpha for the icon of patches in the legend. In this function the face alpha value is set. However, the value has to be known and has to be given as input in allFaceAlphas.
The legend interpreter is set to Latex.
Example how to call this function:
allHandels | Handle array: All handles which should get an entry |
allEntries | Cell array of Strings: All legend entries (size of allHandels) |
allFaceAlphas | (optional) Double array: Containing the alpha values for the each patch and NaNs for other legend entries. If it is not given the alpha values in the legend will not be set. (size of allHandels) |
legendFontSize | (optional) Double: Legend font size (by default, legendFontSize = 9) |
lgnd | matlab.graphics.illustration.Legend: Handle of the legend |