function datascale(X)
% 2-D or 3-D scale data to fit window.
%
% See also: plot, plot3

% Copyright 2012 Levente Hunyadi

xlim([min(X(1,:)), max(X(1,:))]);
ylim([min(X(2,:)), max(X(2,:))]);
if size(X,1) > 2
    zlim([min(X(3,:)), max(X(3,:))]);
end
