2010-05-07 143 views
1

我正在使用子圖,然後使用surf功能在Matlab中以3D形式生成圖像。我如何擺脫座標軸和座標軸的網格線,並將顏色改變爲全部黃色或全部綠色或類似的東西?謝謝。Matlab中的3D繪圖

回答

5

看看AXES PROPERTIES。使用h=gca獲得軸的句柄後,您可以執行set(h,'propertyName','propertyValue',...)修改軸的所有屬性。例如,您可以修改圖形或曲面的屬性 - 請參閱Matlab幫助中的示例figure properties)。

%# 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)