added convenience functions to pull data back out of a database, and to plot it