function h = dataline(X, varargin)
% 2-D or 3-D line series plot.
%
% See also: plot, plot3

% Copyright 2012 Levente Hunyadi

switch size(X,1)  % dimensionality
    case 2
        h = line('XData', X(1,:), 'YData', X(2,:), varargin{:});
    case 3
        h = line('XData', X(1,:), 'YData', X(2,:), 'ZData', X(3,:), varargin{:});
end
