필터 지우기
필터 지우기

how can i modify the color of specifc vector and add a label in quiver3

조회 수: 4 (최근 30일)
Hi to everyone, i wolud like to understand if I can change the color of quiver3 arrows and add a label.
q_w=quiver3(zeros(3,1),zeros(3,1),zeros(3,1),vec1,vec2,vec3);
q_w.LineWidth=3;
q_w.AutoScaleFactor=8;
% x-y-z Red-Green-Blue

채택된 답변

Image Analyst
Image Analyst 2020년 5월 5일
Try this:
vec1 = rand(3,1);
vec2 = rand(3,1);
vec3 = rand(3,1);
for k = 1 : length(vec1)
q1 =quiver3(0,0,0,vec1(1), vec1(2), vec1(3), 'Color', rand(1,3));
hold on;
q1.LineWidth=3;
q1.AutoScaleFactor=8;
q2 = quiver3(0,0,0,vec2(1), vec2(2), vec2(3), 'Color', rand(1,3));
q2.LineWidth=3;
q2.AutoScaleFactor=8;
q3 = quiver3(0,0,0,vec3(1), vec3(2), vec3(3), 'Color', rand(1,3));
q3.LineWidth=3;
q3.AutoScaleFactor=8;
end
Use text() to add a label.
  댓글 수: 1
Andrea Gusmara
Andrea Gusmara 2020년 5월 5일
편집: Andrea Gusmara 2020년 5월 5일
thank you so much for your help , now i can draw the axes as i wanted.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by