When I am trying to animate two different point array and a array containing line data, I am facing a problem that the code gives output only then I resize the plot window.