Description of TimePropUDF

Home > BiKEGG > TimePropUDF.m

# TimePropUDF

## PURPOSE

TimePropUDF

## SYNOPSIS

function TimePropUDF (flxType,TextFont,SelectString,mTime,k,h1)

## DESCRIPTION

     TimePropUDF
     based on user defined properties of text properties, changes
     time-series text properties on map images.

     O. Jamialahmadi
     TMU, Chem. Eng. Dept., Biotech. Group
     Apr. 2015

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- KeggDraw KeggDraw

## SOURCE CODE

    0001 function TimePropUDF (flxType,TextFont,SelectString,mTime,k,h1)
    0002 % TimePropUDF
    0003 % based on user defined properties of text properties, changes
    0004 % time-series text properties on map images.
    0005 %
    0006 % O. Jamialahmadi
    0007 % TMU, Chem. Eng. Dept., Biotech. Group
    0008 % Apr. 2015
    0009
    0010 if isempty(TextFont) % Set default properties
    0011     TextFont.FontName = 'Arial';
    0012     TextFont.FontWeight = 'normal';
    0013     TextFont.FontAngle = 'normal';
    0014     TextFont.FontUnits = 'points';
    0015     TextFont.FontSize = 10;
    0016 end
    0017
    0018 switch flxType
    0019     case 'One'
    0020         if strcmp(SelectString,'NShow')
    0021         elseif strcmp(SelectString,'NO')
    0022             text(10,10,['Time point: ',num2str(mTime(k))]...
    0023                 ,'FontSize',TextFont.FontSize,'FontName',...
    0024                 TextFont.FontName,'FontWeight',...
    0025                 TextFont.FontWeight,'FontAngle',...
    0026                 TextFont.FontAngle,'FontUnits',...
    0027                 TextFont.FontUnits,'Parent',h1)
    0028         else
    0029             text(10,10,['Time point: ',num2str(mTime(k)),...
    0030                 ' ',SelectString],'FontSize',TextFont.FontSize,...
    0031                 'FontName',TextFont.FontName,'FontWeight',...
    0032                 TextFont.FontWeight,'FontAngle',TextFont.FontAngle,...
    0033                 'FontUnits',TextFont.FontUnits,'Parent',h1)
    0034         end
    0035     case 'Two'
    0036         if strcmp(SelectString,'NShow')
    0037         elseif strcmp(SelectString,'NO')
    0038             text(10,10,['Time point: ',num2str(mTime(ceil(k/2)))]...
    0039                 ,'FontSize',TextFont.FontSize,'FontName',...
    0040                 TextFont.FontName,'FontWeight',TextFont.FontWeight,...
    0041                 'FontAngle',TextFont.FontAngle,'FontUnits',...
    0042                 TextFont.FontUnits,'Parent',h1)
    0043         else
    0044             text(10,10,['Time point: ',num2str(mTime(ceil(k/2))),...
    0045                 ' ',SelectString],'FontSize',TextFont.FontSize,...
    0046                 'FontName',TextFont.FontName,'FontWeight',...
    0047                 TextFont.FontWeight,'FontAngle',...
    0048                 TextFont.FontAngle,'FontUnits',...
    0049                 TextFont.FontUnits,'Parent',h1)
    0050         end
    0051 end
    0052