how can I give arrow to a particular color in MATLAB?

6 vues (au cours des 30 derniers jours)
SAHIL SAHOO
SAHIL SAHOO le 21 Jan 2023
Commenté : Image Analyst le 21 Jan 2023
I have this image
I want to plot the arrow with the color bar, let suppose there is blue colour only so that denote this blue color by an up arrow at a particular direction.
like this, can I do this in matlab?

Réponses (1)

Image Analyst
Image Analyst le 21 Jan 2023
Did you try annotation?
figure
plot(1:10)
x = [0.3 0.5];
y = [0.6 0.5];
annotation('textarrow',x,y,'String','y = x ', 'Color', 'b', 'LineWidth', 3)
  6 commentaires
SAHIL SAHOO
SAHIL SAHOO le 21 Jan 2023
can you please give me some documentation regarding to this?
Image Analyst
Image Analyst le 21 Jan 2023
help quiver
QUIVER Quiver plot. QUIVER(X,Y,U,V) plots velocity vectors as arrows with components (u,v) at the points (x,y). The matrices X,Y,U,V must all be the same size and contain corresponding position and velocity components (X and Y can also be vectors to specify a uniform grid). QUIVER automatically scales the arrows to fit within the grid. QUIVER(U,V) plots velocity vectors at equally spaced points in the x-y plane. QUIVER(U,V,S) or QUIVER(X,Y,U,V,S) automatically scales the arrows to fit within the grid and then stretches them by S. Use S=0 or S='off' to plot the arrows without the automatic scaling. QUIVER(...,LINESPEC) uses the plot linestyle specified for the velocity vectors. Any marker in LINESPEC is drawn at the base instead of an arrow on the tip. Use a marker of '.' to specify no marker at all. See PLOT for other possibilities. QUIVER(...,'filled') fills any markers specified. QUIVER(AX,...) plots into AX instead of GCA. H = QUIVER(...) returns a quivergroup handle. Example: [x,y] = meshgrid(-2:.2:2,-1:.15:1); z = x .* exp(-x.^2 - y.^2); [px,py] = gradient(z,.2,.15); contour(x,y,z), hold on quiver(x,y,px,py), hold off, axis image See also FEATHER, QUIVER3, PLOT. Documentation for quiver doc quiver

Connectez-vous pour commenter.

Catégories

En savoir plus sur Vector Fields dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by