% wash clears the current graphics window, maintaining any manual
% axis specification.  

state=get(gca,'XLimMode');
pos=get(gcf,'Position');
ax=axis;
[AZ,EL]=view;
close
figure('Position',pos)
if strcmp(state,'manual')
    axis(ax)
end
if dimension ==3
	if EL==90
		view(3);
	else
		view(AZ,EL);
	end
else
	view(2);
end
hold on
% M. Day, June 6, 2005
% Revised Nov. 17, 2005 to preserve viewpoint for d=3 plots.
