Fixing plot scripts