Correctly plot the quiver on a figure
Mostrar comentarios más antiguos
I am currently trying to project the point along the direction of the normals.However my current method tends to project them in a diagonal manner.
The original img


Now i use this code to ensure that my points are displayed in correct order(Note I can always do set(gca'YDir','reverse') )
plot(Fp(1,:),max(Fp(2,:))+1-Fp(2,:));
%plot(E_stroke(1,:),max(E_stroke(2,:))+1-E_stroke(2,:));
%plot(FP1(1,:),max(FP1(2,:))+1-FP1(2,:));
axis equal;
ax=gca;
h = findobj(gca,'Type','line');
x = h.XData;
y = h.YData;
Final_set_pts=[x;y];
After this when I plot the normals I get this figure,any idea what is happening here

4 comentarios
KSSV
el 15 de Sept. de 2021
You have not given code which gives the plot attched. (Third attachement).
sparsh garg
el 15 de Sept. de 2021
KSSV
el 15 de Sept. de 2021
Dot indexing is not supported for variables of this type.
Error in file (line 3)
quiver(edges2.x+edges2.nx,edges2.y+edges2.ny,-edges2.nx,-edges2.ny);
sparsh garg
el 15 de Sept. de 2021
Respuestas (1)
KSSV
el 15 de Sept. de 2021
0 votos
Try changing (x,y) i.e. use (y,x) instead.
1 comentario
sparsh garg
el 15 de Sept. de 2021
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!