modularized plotter into its own library