add some more plotting functions, examples, and reduce boilerplate