【问题标题】:specific color contour特定颜色轮廓
【发布时间】:2012-08-29 18:43:31
【问题描述】:

我需要同时使用所有这些命令。问题是输出不是黑色的。

contour(f',[0.002]);
az = 90;
el = 90;
view(az, el);
axis off 
set(gcf,'color',[1 1 1]);

我也试过了

[C,h] = contourf(f');
Cld = get(h, 'Children');
for j=1:length(Cld)
if strcmp(get(Cld(j), 'Type'), 'patch')
    Iso = get(Cld(j), 'CData');
    if Iso<-.00002
        set(Cld(j), 'cdata', 0);
    elseif Iso>=-.00002 && Iso<0.00002
        set(Cld(j), 'cdata', 0);
    end
end
end

但它给出了所有轮廓,而我只需要一个具有特定值的轮廓,即 0.002。 非常感谢您。

【问题讨论】:

    标签: matlab colors contour


    【解决方案1】:

    你只想要一个简单的黑色等高线图吗?试试这个:

    contour(f', [0.002], 'LineColor', [0 0 0]);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-26
      • 1970-01-01
      • 2018-11-21
      • 2022-12-24
      • 1970-01-01
      • 2013-03-05
      • 2021-08-15
      • 1970-01-01
      相关资源
      最近更新 更多