# shstat

plots statistics and/or parameters

## Contents

## Syntax

[Hfig val entries missing] = **shstat**(vars, legend, label_title, Hfig)

## Description

plots statistics and/or parameters using allStat.mat as source (which must exist).

Input vars can also be a numerical (n,1)- or (n,2)- or (n,3)-matrix for n = length(select), but the labels on the axis are then empty and output val equals input vars. In that case, read_allStat is bypassed and labels must be set by user afterwards, see mydata_shstat.

If the number of variables as specified in vars equals 1, legend is optional and specifies the colors of the survivor function and median (default: {'b','r'}), or, if ledend is an (n,2)-cell array, n survival curves are plotted.

Input:

- vars: cell string with name(s) of 1, 2 or 3 independent variables
- legend: (m,2)-array with legend: (marker, taxon)-pairs; optional for 1 independent variable
- label_title: optional string for title of figure
- Hfig: optional figure handle (to get the plot in a specified figure)

Output

- Hfig: figure handle for plot (equal to input, if specified there)
- Hleg: figure handle for legend
- val: (n,1 or 2 or 3)-matrix with untransformed x or (x,y) or (x,y,z)-values (depending on the spefication of vars)
- entries: n-cell string with names of entries
- missing: cell string with names of entries that should have been plotted, but are missing (because of lack of data in allStat.mat)

## Remarks

Legend can be set/modified with **select_legend**. Be aware that the sequence of taxa in legend matters. shstat composes a selection-of-entries matrix with first-to-last colum corresponding to taxa in first-to-last row of legend. In the case that a taxon is included in another one, double plotting is suppressed from first-to-last column of selection matrix, and plotting is done for last-to-first column. So, if Aves and Animalia are in legend in this sequence, Animalia-markers are not plotted for Aves, and Aves-markers are on top of Animalia-markers in case of crowding. If Animalia is in legend before Aves, no Aves-markers are shown.

Set options with **shstat_options** (such as logarithmic transformation of axes). Symbols and units are always plotted on the axes in non-numerical mode, but descriptions only if x_label, and/or y_label and/or z_label is 'on'.

In case of 1 variable: ylabel 'survivor function' is plotted if y_label = 'on'; input legend is then optional. Legend should alternatively be specified as: = a 2-cell string, the cells represent color specs for survivor function and median. = a line-legend (composed with select_llegend), the variable are plotted as several survivor functions, with median values in the same colors.

In case of 2 variables: xy-labels are linked to markers (click on them to see entry-names).

In case of 3 variables: hit rotation in the toolbar of the figure.

Make sure that allStat has been generated at the correct temperature (for times and rates); all parameters are at T_ref. Make sure that allStat is consistent with select('Animalia'); can be done via **write_allStat**.

## Example of use

see **mydata_shstat**