Info
この質問は閉じられています。 編集または回答するには再度開いてください。
How do I set properties for different vectors in a plot?
1 回表示 (過去 30 日間)
古いコメントを表示
I want to set several properties of plot3. I have the handle, but I can't set different properties for the three vectors of the plot3.
For example:
handle=plot3(v1,v2,v3);
set(handle(1),'Color',[1 0 0]);
set(handle(2),'Color',[1 1 0]);
set(handle(3),'Color',[1 0 1]);
How can I resolve this?
3 件のコメント
Brett Shoelson
2011 年 2 月 7 日
PLOT3 creates a 3-Dimensional plot of your xyz data. It doesn't create three separate vectors. Perhaps you want PLOT, called 3 times (and HOLD ON)?
回答 (2 件)
Oleg Komarov
2011 年 2 月 7 日
Is this what you're trying to achieve?
% 3 column vectors concatenated In = cumsum(rand(10,3)); plot(In)

Oleg
0 件のコメント
Walter Roberson
2011 年 2 月 7 日
plot3() will produce 3 handles if and only if one of v1, v2, or v3 is a N x 3 array with N at least 2. In such a situation, using set() the way you do should be fine.
0 件のコメント
この質問は閉じられています。
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!