function topoplotTFR(cfg, varargin)

% topoplotTFR plots the topographic distribution of the spectrum or the 
% time-frequency representation of power or coherence that was computed
% using the FREQANALYSIS or FREQDESCRIPTIVES functions.
%
% Use as:
%   topoplotTFR(cfg, data)
%
% Optional parameters & values:
%
% cfg.xparam          field to be plotted on x-axis
% cfg.yparam          field to be plotted on y-axis
% cfg.zparam          field to be plotted as color
% cfg.layout          specification of the layout, see below
% cfg.xlim            'maxmin' or [xmin xmax]         (default = 'maxmin')
% cfg.ylim            'maxmin' or [ymin ymax]         (default = 'maxmin')
% cfg.zlim            'maxmin' or [zmin zmax]         (default = 'maxmin')
% cfg.baseline        'yes','no' or [time1 time2]     (default = 'no')
% cfg.colormap        any sized colormap
% cfg.style           topoplot style                  (default = 'both')
%                     'straight' colormap only
%                     'contour' contour lines only
%                     'both' both colormap and contour lines
%                     'fill' constant color between lines
%                     'blank' just head and electrodes
% cdg.gridscale       scaling grid size               (default = 67) 
% cfg.interplimits    limits for interpolation        (default = 'head')
%                     'electrodes' to furthest electrode
%                     'head' to edge of head
% cfg.interpolation   interpolation method            (default = 'v4')
%                     'v4' MATLAB 4 griddata method
%                     'linear' triangle-based linear interpolation 
%                     'cubic' triangle-based cubic interpolation
%                     'nearest' nearest neighbor interpolation
% cfg.contournum      number of contour lines         (default = 6)
% cfg.shading         'flat' or 'interp'              (default = 'flat')
% cfg.comment         string of text                  (default = date)
%                     Add 'comment' to graph (according to COMNT in the layout)
% cfg.ecolor          Marker color                    (default = [0 0 0] (black))
% cfg.emarker         Marker symbol                   (default = 'o')
% cfg.emarkersize     Marker size                     (default = 2)
% cfg.fontsize        Font size of labels/comment     (default = 8 pt)
% cfg.hcolor          Head lines color                (default = [0 0 0] (black))
% cfg.hlinewidth      Head lines widht                (default = 2)
% cfg.interactive     Interactive plot 'yes', 'no'    (default = 'no')
%
% The layout defines how the channels are arranged. You can specify the
% layout in a variety of ways:
%  - you can give the name of an ascii layout file with extension *.lay
%  - you can give the name of an electrode file
%  - you can give an electrode definition, i.e. "elec" structure
%  - you can give a gradiometer definition, i.e. "grad" structure
% If you do not specify any of these and the data structure contains an
% electrode or gradiometer structure, that will be used for creating a
% layout. If you want to have more fine-grained control over the layout
% of the subplots, you should create your own layout file.
%
% See also:
%   topoplotER, singleplotER, singleplotTFR, multiplotER, multiplotTFR.

topoplotER(cfg, varargin{:});
