plot works very nice, but when large number of samples are given it significantly slows down