bug fixes to plotting

bug fixes to plotting