% script to tidy up x-y plots using the example of http://blogs.mathworks.com/loren/2007/12/11/making-pretty-graphs/
function fh = pretty_timeplot(fh)
if exist('fh','var')
if isempty(fh)
fh = gca;
end
else
fh = gca;
end
%% TICKS
% move ticks on to the outside of the axes
set(findobj(fh,'TickDir','in'),'TickDir','out');
%% OTHER BITS n'PIECES
set(fh, ...
'Box' , 'off' , ...
'TickDir' , 'out' , ...
'TickLength' , [.02 .02] , ...
'YMinorTick' , 'on' , ...
'YGrid' , 'on' , ...
'XColor' , [.3 .3 .3], ...
'YColor' , [.3 .3 .3], ...
'LineWidth' , 1 );