2010-05-07 2 views
1

Matlab에서 3D로 이미지를 생성하기 위해 subplot 및 surf 함수를 사용하고 있습니다. 어떻게하면 축과 축의 눈금 선을 없애고 색상을 모두 노란색이나 녹색으로 바꿀 수 있습니까? 감사.Matlab의 3D 플로팅

답변

5

AXES PROPERTIES을 살펴보십시오. h=gca을 사용하여 축에 대한 핸들을 얻으면 축의 모든 속성을 수정하기 위해`set (h, 'propertyName', 'propertyValue', ...)을 할 수 있습니다.

다음은 예제입니다 (그림 또는 표면의 속성을 수정할 수도 있습니다 - 예를 들어 figure properties의 Matlab 도움말 참조).

%# create a figure 
fh = figure; %# store the figure handle to modify figure properties later 
%# plot some data 
ph = plot(randn(10,3)); %# this returns three handles, one to each line 

%# get the axes handle 
ah = gca; 

%# hide the axes 
set(ah,'Visible','off') 
%# show the axes again 
set(ah,'Visible','on'); 
%# change the color to green 
set(ah,'Color','g'); 

%# change the figure color to red (yes, ugly) 
set(fh,'Color','r') 

%# change the line thickness of the first two lines 
set(ph(1:2),'LineWidth',2)