![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/290509/image.png)
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
0 件のコメント
採用された回答
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/290509/image.png)
Use text() to add a label.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Lighting, Transparency, and Shading についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!