7.18  Criteria with CritFcn

7.18  Criteria with CritFcn#

SDT supports the use of various criteria to be applied on data. The default CritFcn implementation is present in fegui. The fields of a CritFcn structure are

  • .cmap colormap.
  • Content based color
    • .clevel levels associated with the colors (one more level than the number of colors). If not present, the default is an equal spacing of colors in the [0,1] interval. This field is typically used to color tables.
    • .cback default color if below the .clevel interval. Defaults to white.
    • .llevel levels associated with line plots.
    • .Fcn handle to handling function, defaults to fegui('@CritFcn').
  • Manually computed content
    • .imap alternative to .Fcn to specify color index by hand.
 r1=(1:10)'; r1=[r1 sin(r1/max(r1)*pi) cos(r1/max(r1)*pi) ];
 % Standard criterion
 R1=struct('clevel',linspace(0,1,4),'cmap',eye(3),'Fcn',fegui('@CritFcn'));
 % Manual setting of color map
 R2=struct('cmap',eye(3),'imap',round((r1(:,3)+1)*3/2));
 ua=struct('name','CritFcn','ColumnName',{{'#','val','ind';'','','';
   '0','0.00','.0%'; ...  % Column formatting (java)
   R1,R1,R2}}, ... % Define a CritFcn for coloring
  'setSort',2); % use filter-sort
 ua=menu_generation('jpropcontext',ua,'Tab.ExportTable');
 %feval(R1.Fcn,'imap',R1,r1)
 comstr(r1,-17,'tab',ua)