correct figure generation