fixed bug in XYPlot