在Matlab中进行3D绘图

时间:2010-05-07 01:26:14

标签: matlab graph plot

我正在使用子图,然后使用冲浪功能在Matlab中以3D形式生成图像。如何摆脱轴和轴的网格线并将颜色更改为全黄色或全绿色或类似的东西?感谢。

1 个答案:

答案 0 :(得分: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)
相关问题