further work on plotting and pipe from mysql to mongodb