Message Boards Message Boards

3 Replies
6 Total Likes
View groups...
Share this post:

ListVectorPlot not able to plot less vectors...

Dear All,

I have some data ( representing vectors in a grid. 
Plotting with ListVectorPlot works nicely:
ListVectorPlot[full, VectorPoints -> All]

Because there are a lot of {0.,0.} vectors, I decided to delete them:
reduced=DeleteCases[full, {{_, _}, {0., 0.}}]
But now when I try to plot:
ListVectorPlot[reduced, VectorPoints -> All]
It takes forever and crashes. Also when I don't include the VectorPoints -> All. The reduced field can be downloaded here:
Or can recreated with above command. I need all the vectors that I supplied, I don't need (and want) interpolated vectors, just the vectors I supplied.

Any idea what causes Mathematica to take forever and crash finally?

Mathematica version on Mac OSX on Apple Retina Notebook with 16GB ram, everything up to date.
POSTED BY: Sander Huisman
3 Replies
Hello Sander

Yes i have the same problem. However, you can visualize your data using Graphics :
Graphics[{Arrowheads[0.01 Norm[#2]], Hue[0.5 Norm[#2]],
    Arrow[{#1, (#1 + 0.01 #2)}]} & @@@ reduced, AspectRatio -> 1,
Frame -> True, PlotRange -> All]
Hello Sander:

I reduced your issue down to what is hopefully the same issue that uses only the following seven points.  
This crashes the kernel in Windows 9.0.1:

    0.214531}, {-0.0955305, -0.0186209}}, {{0.164063,
    0.240781}, {0.573424, -0.00137298}}, {{0.242188,
    0.201406}, {-0.773653, -0.000402318}}, {{0.214063,
    0.222031}, {-0.0126868, -0.00317579}}, {{0.129688,
    0.256719}, {1.47251, -0.00696257}}, {{0.195313,
    0.227656}, {0.0829226, 0.0108867}}, {{0.0171875,
    0.245469}, {0.707327, -0.00945836}}}, VectorPoints -> All]

However, taking any sample of 6 of these 7 points does not result in a crash when plotted.

I will see that this is reported to the appropriate developer.
Dear Kurt,

Thanks for making a minimum version that shows the same unexpected behavior. What the exact issue is I don't know. Maybe it tries to triangulize the points (by default a nice n*m grid of vectors is shown). Maybe the triangulation fails somehow? I really have no idea. If there is any update to this issue or workaround, could you update that here?

I made my own code like the one of Jacques. That also supports colorfunction and things alike...

Thanks in advance,


POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract