minor edits to plotting code