more improvements to plotting code
more improvements to plotting code