fixed bug in threshold plot