AddFillToPlots:

Path: Common/Graphics

% Find mode changes in data and draw as filled sections on existing plots.

 Time and data must be the same size. diff will be used to find the points
 where the value of data changes. Each segment will then be assigned a
 background color from colors. The 'auto' colors mode used the axes color
 order property. If a figure handle is not specified the current figure is
 used.
   
 Type AddFillToPlots for a demo.
--------------------------------------------------------------------------
   Form:
   AddFillToPlots(time,data,h,colors,alpha)
--------------------------------------------------------------------------

   -------
   Inputs:
   -------
   time      (1,n)            Time axis data (the same for all subplots)
   data      (1,n)            Data containing the mode changes
   h         (1,1)            Figure handle with plots
   colors    (n,3) or 'auto'  Colors for fill patches
   alpha     (1,1)            facealpha property for the patch, in range [0 1]

   --------
   Outputs:
   --------
   None.

--------------------------------------------------------------------------

Children:

Common: CommonData/SwooshWatermark
Common: General/CellToMat
Common: General/MatToCell
Common: General/Watermark
Common: Graphics/NewFig
Common: Graphics/Plot2D
Common: Graphics/PltStyle

Back to the Common Module page