ha = add_fighdr(pp); Adds an axes to a figure for the purpose of adding header information. Returns a handle to the axes.
0001 function ha = add_fighdr(pp) 0002 % ha = add_fighdr(pp); 0003 % 0004 % Adds an axes to a figure for the purpose of adding header information. 0005 % Returns a handle to the axes. 0006 % 0007 0008 % Need to add some field checking and default handling 0009 try tfs = pp.titlefontsize; catch tfs = 14; end 0010 0011 vert_offset = 0.95; 0012 ha = axes('position', [0 vert_offset 1 1-vert_offset], 'units','norm'); 0013 axis('off') 0014 0015 % Add the title 0016 text(0.5,0.5, pp.title, 'fontsize', tfs, 'horizontalalign', 'center'); 0017 0018 % Add a timestamp 0019 text(0,1, datestr(now), 'horizontalalign','left','verticalalign','top')