You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: eegplotold.m
    path of file: ./repos/eeglab/functions/miscfunc
    
    the code of the file until where you have to start completion: % EEGPLOTOLD - display data in a horizontal scrolling fashion 
%                with (optional) gui controls (version 2.3)
% Usage: 
%   >> eegplotold(data,srate,spacing,eloc_file,windowlength,title)
%   >> eegplotold('noui',data,srate,spacing,eloc_file,startpoint,color)
%
% Inputs:
%   data         - Input data matrix (chans,timepoints) 
%   srate        - Sampling rate in Hz {default|0
    
function [outvar1] = eegplotold(data,p1,p2,p3,p4,p5,p6)

% Defaults (can be re-defined):

DEFAULT_ELOC_FILE = 0;            % Default electrode name file
                                  %   [] - none, 0 - numbered, or filename
DEFAULT_SAMPLE_RATE = 256;        % Samplerate 
DEFAULT_PLOT_COLOR = 'k';         % EEG line color
DEFAULT_AXIS_BGCOLOR = [.8 .8 .8];% EEG Axes Background Color
DEFAULT_FIG_COLOR = [.8 .8 .8];   % Figure Background Color
DEFAULT_AXIS_COLOR = 'k';         % X-axis, Y-axis Color, text Color
DEFAULT_WINLENGTH = 10;           % Number of seconds of EEG displayed
DEFAULT_GRID_SPACING = 1;         % Grid lines every n seconds
DEFAULT_GRID_STYLE = '-';         % Grid line style
YAXIS_NEG = 'off';                % 'off' = positive up 
DEFAULT_NOUI_PLOT_COLOR = 'k';    % EEG line color for noui option
                                  %   0 - 1st color in AxesColorOrder
DEFAULT_TITLEVAL = 2;             % Default title
                                  %   string, 2 - variable name, 0 - none
SPACING_EYE = 'on';               % spacing I on/off
SPACING_UNITS_STRING = '\muV';    % optional units for spacing I Ex. uV
DEFAULT_AXES_POSITION = [0.0964286 0.15 0.842 0.788095];
                                  % dimensions of main EEG axes
if nargin<1
   help eegplotold
   return
end