deep copy the data so plots don't share data

Otherwise they shared the same data array, so moving a point in one caused
the matching point to move in the other as soon as you tried to drag it.
more logically reorder some code