Getting plotting working correctly - works in a basic way now.