add argument to run action after plot generation
use post_action to make a legend