Handle NaNs when drawing threshold