MATLAB Answers

How to let vector direction define quiver plot colors

31 views (last 30 days)
Aidan Starr
Aidan Starr on 10 Jul 2018
Commented: Aidan Starr on 12 Feb 2019
I'm trying to plot some vector data in matlab using the quiver function (full disclosure, I'm actually using m_quiver from the m_maps toolbox).
What I want is to set each individual arrow color to be relative to its direction, e.g. north being red, south being blue. Is there a way to do this? I'm picturing something like the CData option with scatter plots!

  2 Comments

Theresa Morrison
Theresa Morrison on 12 Feb 2019
Hi Aidan, Did you find something to do this? I am interested in the same sort of plotting.
Aidan Starr
Aidan Starr on 12 Feb 2019
I gave up... At the moment I'm just using quiver_mc (which is an awesome function) and letting the magnitude set the color. -Sorry!

Sign in to comment.

Accepted Answer

KSSV
KSSV on 10 Jul 2018

  1 Comment

Aidan Starr
Aidan Starr on 10 Jul 2018
Great! Although this seems to define colour by magnitude and not direction. My issue is the arrow directions are slightly unclear because of the density.

Sign in to comment.

More Answers (0)

Products


Release

R2018a

Translated by