Hold on not working with ezplot3
8 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Wayne King
on 21 Oct 2011
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');
More Answers (0)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!