function qfig

% some handy stuff for your figures.
% to use this, add set(0,'defaultfigurekeypressfcn','qfig').
% enter 'h' while in a figure window for a list of functions.

switch get(gcf,'currentchar')

case 'b'
 set(gca,'box','on')

case 'G'
 grid on

case 'g'
 grid off

case 'Z'
 zoom on

case 'z'
 zoom out

case 'x'
 adddeg(gca,'x')

case 'y'
 adddeg(gca,'y')

case 'i'
 axis ij

case 'I'
 axis xy

case 'e'
 axis equal

case 'c'
 colorbar

case 'j'
 set(gca,'xdir','reverse')

case 'J'
 set(gca,'xdir','normal')

case 'h'
 fprintf('\n')
 fprintf('G = grid on		g = grid off		Z = zoom on\n')
 fprintf('z = zoom out		x = add x-axis degs	y = add y-axis degs\n')
 fprintf('i = axis ij		I = axis xy		e = axis equal\n')
 fprintf('c = colorbar		j = reverse x-axis	J = normal x-axis\n')
 fprintf('b = set box on\n')

end
