Minor changes to plotting algorithms