updated align_data_with_fig