function tickerplots(values,cmin,cmax)
% tickerplots sets the parameters for the activeBrain.m function and
% then calls activeBrain.m for plotting the p-values on pre-defined
% electrodes (stored in ALL_electrodes_linear.mat) on the brain (stored
% in ALL_brain.mat).
%
% CALLING SEQUENCE:
%       tickerplots(values,cmin,cmax)
% INPUT:
%       values: The values to be plotted on the generic brain model. In the
%       context of this article, this corresponds to the -log pvalues
%       obtained from correlation overt gamma band power with either speech
%       or covert gamma band power.
%       cmin: Lower limit of the color range for cortical activation plot.
%       cmax: Upper limit of the color range for cortical activation plot.

%Set the directory to the present working directory.
dir=pwd;

% Load the brain model
load([dir '/ALL_brain.mat']);

%Load the electrode mappings in the above brain model
load ([dir '/ALL_electrodes_linear']);

% Specify parameters for plotting
cmapstruct.fading=1;
cmapstruct.ixg2=32;
cmapstruct.ixg1=-cmapstruct.ixg2;
cmapstruct.enablecolorbar=0;
cmapstruct.cmin =cmin;
cmapstruct.cmax = cmax;
viewstruct.enableaxis=0;
viewstruct.what2view = {'brain' 'activations'};
viewstruct.viewvect=[-90,10];
viewstruct.lightpos=[-200,0,0];
tala.activations=values;

% Call activateBrain using the parameters defined above. activateBrain.m is
% the function that will actually plot the data at the specified electrode
% locations on the brain model.
activateBrain(cortex, vcontribs, tala, 1, cmapstruct, viewstruct );

%Set zoom level for better visualization
zoom(1.65);

%Set axis limits
caxis([cmapstruct.cmin cmapstruct.cmax])