proper treatment of overflows for 2d plots