Maybe slightly more efficient implementation of If
Added auto-bounds on the plots