put figure generation in one code
rationalize name