Modified for xy plot