Full window 3D plots got clipped
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello,
I am plotting crystal structure in 3D without showing axes or labels. I want a figure where only the plotted 3D surfaces are visible and it can be manually rotated but during manual rotation the objects are not rescaled. If come up with this code:
figure();
rotate3d on;
set(gca,'Color','none');
set(gca,'Box','off');
daspect([1 1 1]);
pbaspect([1 1 1]);
axis off
axis vis3d
set(gca,'Clipping','off');
set(gca,'OuterPosition',[0 0 1 1]);
The only problem is that after rotation some part of the figure got clipped: http://picturepush.com/public/6576546 It is not only in the sides, also on the "back" side of the figure some things are disappearing. It looks like there is a box, outside which things don't get rendered.
Any idea how to solve it?
Thanks!
Sandor
댓글 수: 0
채택된 답변
Jan
2011년 9월 19일
Do not set the OuterPosition, but the Position:
set(gca,'Position', [0 0 1 1]);
Setting the OuterPosition considers space for the TickMarks, Labels and the Title.
Objects on the front dissappear, when they are moved behind the camera position. Then changing the CameraViewAngle instead of the CamaraPosition is helpful. In both cases the zooming effect is similar (not identical), but the view-angle does not change the distance between the view point and the oobjects.
댓글 수: 0
추가 답변 (1개)
Sandor Toth
2011년 9월 19일
댓글 수: 2
Jan
2011년 9월 19일
Please enable the visibility of the axes to see the difference between setting the Position and the OuterPosition. I cannot believe, that this does not change anything. The cutoff at the margins looks exactly like the objects are clipped at the axes limits.
Note that setting the Clipping property of the axes to 'off' has no effect. The Clipping of the drawn objects would be more important.
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!