필터 지우기
필터 지우기

Project 3D plot to 2D automatically

조회 수: 12 (최근 30일)
VINAYAK VINAYAK
VINAYAK VINAYAK 2022년 7월 24일
답변: Voss 2022년 7월 24일
Hi,
I have 3D plots all of which i would like to project to, say, x-y plane. I know i can do it by opening each one of them in the figure GUI but how do i do it automatically while saving them?
Thanks

답변 (1개)

Voss
Voss 2022년 7월 24일
If I understand what you want to do, you can use view(2) (or more generally, i.e., if it's not always going to be the x-y plane, use set(gca(),'View',[0 90]) but change [0 90] to the view you want). Example:
% a 3D plot
surf(1:10,1:10,rand(10))
% for demonstration only, copy the axes to a new figure
% (you wouldn't need to do this)
copyobj(gca(),figure())
% set the view to X-Y plane
view(2)

카테고리

Help CenterFile Exchange에서 Graphics Objects에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by