Fix limits bug in matplot