it seems that the first column in your csv file is the row number.
Use Edit>Options>Input/Output to control whether you want row numbers or
not ("Save row numbers").
You can use the Macro recorder Plugins>Macros>Record to get the macro
command for settings the Input/Output options of your choice.
By the way, in your macro
xpoints = newArray ();
ypoints = newArray ();
Plot.getValues (xpoints, ypoints);
you don't need the two lines for creating the xpoints & ypoints arrays;
Plot.getValues creates them anyhow.