Contents
shstat_taxa
plots statistics and/or parameters for a taxon as function of taxonomic distance
Syntax
[Hfig val entries] = shstat_taxa(vars, legend, label_title, Hfig)
Description
Plots statistics and/or parameters using allStat.mat as source (which must exist) for a taxon specified in legend{end,2} as function of normalised taxonomic distance. These distances are computed with dist_taxa, on the basis of the classification, as specified in the lists-of-lists for subsequent pairs of entries.
Input vars can also be a numerical (n,k)-matrix for n = length(select) and f = size(vars,2), but the labels on the yxis 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.
Input:
- vars: k-cell string with name(s) of independent variables, or (n,k) matrix of values with n = length(select)
- legend: (m,2)-array with legend: (marker, taxon)-pairs; taxon legend{end,2) must include all other taxa
- label_title: optional string or k-cell string for title of figure
- Hfig: optional k-vector with figure handles (to get the plot in a specified figure). Default 1,2,.,k
Output
- Hfig: k-vector with figure handles for plots (equal to input, if specified there)
- Hleg: scalar with figure handle for legend
- val: (n,k)-matrix with untransformed y-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
The computation of taxonomic distances might take some time. Legend can be set/modified with select_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.
No transformation is done in this function, so, if required, do it outside and use numerical mode.
Make sure that allStat has been generated at the correct temperature (for times and rates); all parameters are at T_ref, but statistics at T_typical. Make sure that allStat is consistent with select('Animalia'); can be done via write_allStat.
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'.
See shstat for further details
Example of use
shstat_taxa({'kap', 'p_M', 'v'}, legend_actino) kvp = read_allStat({'kap', 'p_M', 'v'}); kvp(:,[2 3]) = log10(kvp(:,[2 3]); shstat_taxa( kvp, legend_actino)