Updates to plotting code + fix for attribute lookup