Change threshold and plotting functions