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

12 visualizaciones (últimos 30 días)
SAHIL SAHOO
SAHIL SAHOO el 21 de En. de 2023
Comentada: Image Analyst el 21 de En. de 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?

Respuestas (1)

Image Analyst
Image Analyst el 21 de En. de 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 comentarios
SAHIL SAHOO
SAHIL SAHOO el 21 de En. de 2023
can you please give me some documentation regarding to this?
Image Analyst
Image Analyst el 21 de En. de 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

Iniciar sesión para comentar.

Categorías

Más información sobre Vector Fields en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by