IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
html_table_std_colors.m File Reference

Detailed Description

HTML table where data items may have associated standard deviations.

This version of HTML table paints each cell with a colour proportional to corresponding element in M

See also
html_comparison_std.m, html_confusion.m, html_comparison.m, html_table_std.m

Definition in file html_table_std_colors.m.

Go to the source code of this file.

Functions

function html_table_std_colors (in M, in S, in rowlabels, in collabels, in cornerstr, in minimum, in maximum, in pow)
 
function cellcolor2 (in n, in min, in max, in pow)
 Calculates a background color based on percentage. More...
 

Function Documentation

function cellcolor2 ( in  n,
in  min,
in  max,
in  pow 
)

Calculates a background color based on percentage.

Sqrt improves the color representation, because it makes low values already some color Color formula is:

  • Red: maximum;
  • Green and blue: sqrt(value)/sqrt(sum of row)
    Parameters
    nintensity
    maMaximum
    Return values
    [bgcolor]or [bgcolor, fgcolor]
function html_table_std_colors ( in  M,
in  S,
in  rowlabels,
in  collabels,
in  cornerstr,
in  minimum,
in  maximum,
in  pow 
)
Parameters
MSquare matrix or cell. If cell, may contain either numbers of strings
SMatrix of standard deviations. This one must be a matrix
rowlabelscell of row labels
collabelscell of column labels
cornerstr=''. String to put in the corner
minimum
maximum
pow=10. Color function power. See internal function cellcolor2()
Returns
s A string