# Increase streamline counts in ListStreamPlot

I have a list with [x,y,u,v] and the list size is 3240 x 4.

I am using the below code to plot the vectors,

a = Import["/Users/user/Desktop/test.csv", "CSV"];
x = a[[All, 1]];
y = a[[All, 2]];
u = a[[All, 3]];
v = a[[All, 4]];
data = MapThread[{{#1, #2}, {#3, #4}} &, {x, y, u, v}];
ListStreamPlot[data, StreamPoints -> Fine, StreamColorFunction -> "Rainbow"]


The result is as follow,

I want more number of lines and if possible a continuous line with multiple arrowheads. Can anyone help me?

PS: I want to attach my CSV but don't know how to do.

• StreamPoints -> Fine? Commented Aug 31, 2016 at 15:05
• @Feyre I have added that also. But not much change :( Commented Aug 31, 2016 at 15:13

If the Stream Points Options of ListStreamPlot do not help I would suggest generating an interpolation of your vector field and to use StreamPlot with that interpolation, assuming your vector field is smoth enough. So first a set of sample data and its interpolation:

data = Table[{{x,y},{-1-x^2+y,1+x-y^2}},{x,-3,3,.5},{y,-3,3,.5}];
v = Interpolation@Flatten[data, 1]


Now we can plot this interpolatet vector field with StreamPlot and use all of its options:

StreamPlot[v[x,y],{x,-3,3},{y,-3,3},


All Options of StreamPlot should work with the interpolation function.

But if you want really nice StreamPlots you will have to tweak that quite a bit: I personaly dislike Mathematicas plotting tools for stream and vector plots. I would recommend looking at matplotlib of Python: it generates very nice Plots and they are much easier to export and look well after export. But no hate on Mathematica with tweaking you might get good plots with it as well and with more tweaking even nice ones after export.

• As you suggested, I tried StreamPlot[v[x, y], {x, -10, 0}, {y, -38, -35}] but then I am getting error as The point -16.955 in dimension 1 is duplicated. Commented Aug 31, 2016 at 16:22
• Can you upload your dataset somewhere? Dropbox, Onedrive or elsewhere? I can not say to much without having the data.
– N0va
Commented Aug 31, 2016 at 16:35
• Sure. Click Here for data. BTW, thanks for your help... Commented Aug 31, 2016 at 16:41
• data = Import["test.csv"]; vdata = Table[{data[[i, {1, 2}]], data[[i, {3, 4}]]}, {i, 1,Length@data}]; v = Interpolation[vdata] StreamPlot[v[x, y], {x, -10, 0}, {y, -38, -35}, StreamPoints -> Fine, StreamScale -> Large, PlotRangePadding -> None]  Works for me.
– N0va
Commented Aug 31, 2016 at 18:33