Add threshold option in drawing figures