Home > atmlab > graphs > xpatch.m

xpatch

PURPOSE ^

XPATCH A patch object defined at a set of x-coordinates

SYNOPSIS ^

function hp = xpatch(x,ylow,yhigh,c,varargin)

DESCRIPTION ^

 XPATCH   A patch object defined at a set of x-coordinates

    As YPATCH but for patches defined as a function of x.

 FORMAT   hp = ypatch(x,ylow,yhigh,c[,varargin])
        
 OUT   hp         Handle to patch object.
 IN    x          X-coordinates.
       ylow       Low y-value for each x.
       yhigh      High y-value for each x.
       c          Color specification.
 OPT   varargin   Arguments passed on to PATCH.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

xpatch.m

SOURCE CODE ^

0001 % XPATCH   A patch object defined at a set of x-coordinates
0002 %
0003 %    As YPATCH but for patches defined as a function of x.
0004 %
0005 % FORMAT   hp = ypatch(x,ylow,yhigh,c[,varargin])
0006 %
0007 % OUT   hp         Handle to patch object.
0008 % IN    x          X-coordinates.
0009 %       ylow       Low y-value for each x.
0010 %       yhigh      High y-value for each x.
0011 %       c          Color specification.
0012 % OPT   varargin   Arguments passed on to PATCH.
0013 
0014 % 2003-03-09   Created by Patrick Eriksson.
0015 
0016 
0017 function hp = xpatch(x,ylow,yhigh,c,varargin)
0018 
0019 
0020 hp = patch( [ vec2col(x); flipud(vec2col(x)) ], ...
0021             [ vec2col(ylow); flipud(vec2col(yhigh)) ], ...
0022             c, varargin{:} );
0023 
0024 set( hp, 'EdgeColor', 'none' );

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005