fig = figure();
ax(1) = subplot(1,2,1);
ax(2) = subplot(1,2,2,'Parent',fig);
x = linspace(0,2,20);
o1 = plot(x,exp(x));
[~,o2] = contour(ax(1),peaks);
set(ax(2),'nextplot','add');
o3 = plot(ax(2),x,exp(2*x));
type_o3=get(o3,'type');
allChildFig = allchild(fig);
anc_o1=ancestor(o1,'axes');
anc_o2=ancestor(o2,'figure');
问题:
(1)把ax(1)的colormap改为 bone?
set(ax(1),'colormap','bone')
出错:Axes 类中没有 colormap 属性。
(2)用set指令处理对象o3, 把所有数据点用圆圈描绘,圆圈内部颜色为 [0.8,0.8,0.8],圆圈边框线头为黑色。
不知道要修改的属性是什么?求大神们解答下
set(gcf,'unit','normalize','position',[440 205 899 573])
set(ax(2),'yscale','log');set(ax(2),'ygrid','on')
set(ax(2),'xdir','reverse')
set(ax(1),'xtick',[]);set(ax(1),'ytick',[])
set(ax(1),'colormap',bone)
set(o2,'LineStyle','--')
set(o1,'LineWidth',10);set(o1,'LineStyle','-.')
set(o3,'marker','o');set(o3,'markerfacecolor',[0.8,0.8,0.8]);set(o3,'markeredgecolor','k')
%都是苏恭超的苦逼学生啊
冠东,把所有数据点用圆圈描绘,圆圈内部颜色为 [0.8,0.8,0.8],圆圈边框线头为黑色
(属性分别为:marker,markerfacecolor,markeredgecolor)