Add xyz arrows in plot

조회 수: 33 (최근 30일)
Dion Theunissen
Dion Theunissen 2021년 4월 8일
답변: KSSV 2021년 4월 8일
Hi,
I have a plot like this:
Now i want to add in the middle of the plot some xyz arrows so that i can show how the lines are going, something like this:
Can anyone help me how to fix this?
Cheers.

채택된 답변

KSSV
KSSV 2021년 4월 8일
% points
x = rand(50,1) ;
y = rand(50,1) ;
z = rand(50,1) ;
% vectors
u = rand(50,1)/10 ;
v = rand(50,1)/10 ;
w = rand(50,1)/10 ;
%
O = zeros(size(x)) ;
% plot
plot3(x,y,z,'.-r')
hold on
quiver3(x,y,z,u,O,O,'r')
quiver3(x,y,z,O,v,O,'b')
quiver3(x,y,z,O,O,w,'g')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by