improvements to plotting