Home > NoiseTools > nt_topoplot.m

# nt_topoplot

## PURPOSE

nt_topoplot(cfg,data) - simple topoplot

## SYNOPSIS

function nt_topoplot(cfg,data)

## DESCRIPTION

    nt_topoplot(cfg,data) - simple topoplot

      nt_topoplot(topo,data): use 'topo' layout file

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- nt_interpolate_bad_channels y=interpolate_bad_channels(x,iBad,coordinates,n) - interpolate bad channels from good

## SOURCE CODE

    0001 function nt_topoplot(cfg,data)
    0002 %nt_topoplot(cfg,data) - simple topoplot
    0003 %
    0004 %  nt_topoplot(topo,data): use 'topo' layout file
    0005 %
    0006
    0007 if nargin<2; error('!'); end
    0008
    0009 data=data(:);
    0010
    0011 if ~isstruct(cfg)
    0012     topo=cfg;
    0013     cfg=[];
    0014     cfg.layout=topo;
    0015 end
    0016
    0017 % todo: extract fields from cfg as arguments to ft_topo_plot
    0018
    0019 layout=ft_prepare_layout(cfg);
    0020
    0021
    0022 ft_plot_topo(layout.pos(1:numel(data),1), layout.pos(1:numel(data),2), data',...
    0023     'mask', layout.mask,...
    0024     'outline', layout.outline, ...
    0025     'interplim', 'mask');
    0026
    0027 % ensure symmetrical color axes
    0028 clim=get(gca,'clim');
    0029 set(gca,'clim',[-1 1]*max(abs(clim)));
    0030
    0031 axis off
    0032 axis equal