Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Why don't Axes camera properties seem to work?

1 回表示 (過去 30 日間)
David Winthrop
David Winthrop 2017 年 10 月 18 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I don't understand how the camera properties of the axes work. For example, say I draw a unit circle in the plane and put the camera directly above its center at a height of one unit. If I set the cameratarget to look quite far away from the circle and narrow the view angle, I should not be able to see the circle, but I can. An image of the final output is shown below. I am using r2012b.
Also, when adding an image to this question I noticed a significant difference between how the figure looks in the matlab window and how it is saved. It is saved more like I imagine it should look!! Why does it look so different in the figure window than when I save it as a png. I have attached both for comparison.
What is going on here?
Thanks.
Here is the code I am using.
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')

回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by