Quiver plot arrows hidden by surface plot?
Show older comments
Hello all,
I am creating a surface plot, and plotting on top of this a quiver plot. Everything works great, however where I have large "z" values on my surface plot, the quiver arrows are being hidden by the graph.
Any ideas how to solve this? I have attached an image of my problem, look at the yellow boxes, where the quiver arrows are hidden.

Accepted Answer
More Answers (1)
Thomas Rosin
on 24 Apr 2019
0 votes
I don't think there are hidden, I just think your arrow size is too small.
The tip of the arrow scale with its length but it's a parameters you can set on the quiver function.
6 Comments
Mark Lepage
on 24 Apr 2019
Star Strider
on 24 Apr 2019
If you don’t need the gridlines on your surf plot, you can set ‘EdgeColor’ (link) to be 'none' or 'interp', and you can set shading (link) to interp as well.
Either of those would likely make the arrows more visible.
Mark Lepage
on 24 Apr 2019
Star Strider
on 24 Apr 2019
My pleasure.
‘However, the middle arrows are still missing! Any ideas for this?’
Not really. I have no idea what you’re doing.
So I’m guessing here. One possibility is to plot the surf plot first, and the quiver plot afterwards. Another might be to add a ‘z’ coordinate to the quiver plot (perhaps the ‘z’ values of the surf plot, or plot the arrows on a plane higher than the maximum ‘z’ value of the surf plot) so that the arrows plot above the surf plot.
Mark Lepage
on 25 Apr 2019
Star Strider
on 25 Apr 2019
@Mark Lepage —
As always, my pleasure.
Categories
Find more on Vector Fields in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!