Hold on not working with ezplot3
8 次查看(过去 30 天)
显示 更早的评论
I'm not sure why the hold on is not working in this example.
syms t1 t2 t3
line1 = [0,0,0] + t1*[0,0,1];
line2 = [1,0,0] + t2*[0,0,1];
line3 = [0,1,0] + t3*[0,0,1];
hold on
ezplot3(line1(1),line1(2),line1(3))
ezplot3(line2(1),line2(2),line2(3))
ezplot3(line3(1),line3(2),line3(3))
hold off
Any clues?
0 个评论
采纳的回答
Wayne King
2011-10-21
Hi Sara, ezplot3() is written in such a way that it undoes the effect of any previously issued hold on command.
In this case you can use plot3()
t = linspace(0,1,300);
plot3(zeros(300,1),zeros(300,1),t);
axis([-2 2 0 2 0 2]);
grid on;
hold on;
plot3(ones(300,1),zeros(300,1),t,'r');
plot3(zeros(300,1),ones(300,1),t,'k');
legend('line1','line2','line3');
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!