JuliaPlots / Plots.jl

Powerful convenience for Julia visualizations and data analysis
https://docs.juliaplots.org
Other
1.83k stars 353 forks source link

Plotting vector field with quiver: how to view vector magnitude without image getting too busy [FR] #2925

Open alexboche opened 4 years ago

alexboche commented 4 years ago

I am trying to plot a vector field using quiver. I believe that is a function from Plots.jl, no?

When I just plot it regularly, the image comes out too full since the arrows are too long and you can't see what's going on.

Screen Shot 2020-08-22 at 10 00 09 PM

I tried to normalize the vectors to unit vectors and that made it a lot cleaner, but I would like to be able to get some sense of the vector size as well.

Screen Shot 2020-08-22 at 10 01 28 PM

Is there a way to get the vector size without it obscuring everything? Maybe using colors? Looks like this can be done with quiver in matplotlib here

Thanks

cocoa1231 commented 3 years ago

I'm facing this issue as well, I was unable to get the clean quiver matplotlib-like plots using Plots.jl regardless of the backend. GRUtils supports quiver plots - https://heliosdrm.github.io/GRUtils.jl/stable/api/plotting/#GRUtils.quiver