update figure when source flag changed