add a feature to the CLI and API to save the plots
add a feature to the CLI and API to save the plots