first draft of generic plotter script