How can a show the correct view of graphical objects??
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
I am trying to make an animation, and I noticed that the camera DOES NOT show what it should show. How can I fix this?
I make a unit circle, and place the camera directly above the central point and set the camera target to a far away location outside the circle with a narrow field of view. Obviously, from this view I should not see the entire circle, but I do.
PLEASE ANY ADVICE!?
t = linspace(0,pi,100);
x = cos(t);
y = sin(t);
plot3(x,y,zeros(size(x)))
hold on
plot3(-x,-y,zeros(size(x)))
set(gca,'cameraposition',[0,0,1])
set(gca,'cameratarget',[10,0,0])
set(gca,'cameraviewangle',25)
xlabel('x')
ylabel('y')

Risposte (1)
David Winthrop
il 19 Ott 2017
0 voti
4 Commenti
Kelly Kearney
il 20 Ott 2017
What version of Matlab are you running? And are you setting any other axis properties in other code? When I run your example, I get a different plot than you're seeing, one that appears to be correct (partial circle visible at bottom of view). I notice your plot has gridlines on, and that's not part of your code snippet above, so perhaps you set (or unset) some other properties somewhere?
David Winthrop
il 20 Ott 2017
Walter Roberson
il 20 Ott 2017
R2017b view looks fine.
Kelly Kearney
il 20 Ott 2017
I'm running 2016b.
Questa domanda è chiusa.
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!