Plot python altered and fixed