updating threshold plots to avoid issues with knitr