auto date calculation and improved figure labelling