Committed first cut of plotting code