I'm trying to plot some vector fields using LIC technique. More specifically, I'm using the Python solution for this kind of plot.

Before applying that approach, I was plotting my vectors as quiver. This give me results like this:

enter image description here

However, for large data, this technique is not recommended because the larger the data, the more compressed the arrows will be, and, consequently, the plot will get confusing and not readable.

Using LIC, however, I got the opposite result. I get a poor resolution for my plot and it is hard to understand the flow behavior.

enter image description here

Both plots are from a 61 x 61 vector field.

I really would like to use LIC, however, I'm wondering if there is a data size requirement to get good results.

Is there an approach to solve this problem?

Thank you.

  • $\begingroup$ Can't you use quiver but skip some rows/columns while plotting? Like examples 5 and 3 here. $\endgroup$ – nicoguaro Aug 12 '14 at 23:20
  • $\begingroup$ Yes, this definitely is a possible solution. However, I was asked to use LIC somehow. $\endgroup$ – pceccon Aug 12 '14 at 23:24
  • $\begingroup$ Another thing is that I'm merging this plot with another information, such as sources, sinks, saddles... Using LIC a get a "clear" plot. $\endgroup$ – pceccon Aug 12 '14 at 23:43
  • $\begingroup$ Is it possible to share your vector field data ? $\endgroup$ – SAAD Sep 2 '14 at 13:34
  • $\begingroup$ Of course, @SAAD. (: However, I didn't save this data, so I generated a new one (and edited the question images). Here is the code (from Scipy) and images: dropbox.com/sh/ped312ur604357r/AACQGloHDAy8I2C6HITFzjqza?dl=0 $\endgroup$ – pceccon Sep 2 '14 at 18:40

Well, it seems that there is a size requirement to get a good resolution I'm not sure if that is the properly way to solve this, but it worked for me.

What I did was to interpolate the x and y components of the vector field. Talking about Python, this can be done using the scipy.ndimage.zoom function.

As an example, I had this vector field (100 x 100):

enter image description here

Which results in this LIC image:

enter image description here

Using an interpolation with factor 4, I'm able to get this result from LIC:

enter image description here



LIC is very good for visualizing such fields, but what is the texture warped here? First of all, use LIC with white noise in the very beginning. You could then try Perlin noise and similar. There are also other variants of information, such as the coherence directions, which would give you a better idea of the flow field. You could check out this work of mine for an interesting application.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.