Info

此问题已关闭。 请重新打开它进行编辑或回答。

Why don't Axes camera properties seem to work?

1 次查看(过去 30 天)
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