'Create x-y projection of attributes in attrlist.'

def get_xy_data_positions(self, xattr, yattr, filter_valid=False, copy=True):

    xattr_index = self.domain.index(xattr)
    yattr_index = self.domain.index(yattr)
    if (filter_valid is True):
        filter_valid = self.get_valid_list([xattr_index, yattr_index])
    if isinstance(filter_valid, np.ndarray):
        xdata = self.jittered_data[(xattr_index, filter_valid)]
        ydata = self.jittered_data[(yattr_index, filter_valid)]
    elif copy:
        xdata = self.jittered_data[xattr_index].copy()
        ydata = self.jittered_data[yattr_index].copy()
    else:
        xdata = self.jittered_data[xattr_index]
        ydata = self.jittered_data[yattr_index]
    if self.domain[xattr_index].is_discrete:
        xdata *= len(self.domain[xattr_index].values)
        xdata -= 0.5
    else:
        xdata *= (self.attr_values[xattr][1] - self.attr_values[xattr][0])
        xdata += float(self.attr_values[xattr][0])
    if self.domain[yattr_index].is_discrete:
        ydata *= len(self.domain[yattr_index].values)
        ydata -= 0.5
    else:
        ydata *= (self.attr_values[yattr][1] - self.attr_values[yattr][0])
        ydata += float(self.attr_values[yattr][0])
    return (xdata, ydata)
