【问题标题】:Contour lines not showing up properly轮廓线未正确显示
【发布时间】:2015-06-25 00:57:49
【问题描述】:

我正在尝试将高斯混合模型的轮廓线可视化到我的散点图,但它们没有正确显示,首先我认为它们被点重叠但即使我先画线然后绘制问题仍然存在散点。

我生成图的代码:

mn = min(pcaX); mx = max(pcaX);
for i = 1:6
    subplot(2,3,i);
    gscatter(pcaTest(:,1), pcaTest(:,2), testLabels);
    hold on;
    ezcontour(@(x,y)pdf(models{i},[x y]), [mn(1) mx(1) mn(2) mx(2)]);
    hold off, axis xy, title(['For class ',int2str(i),'components:',int2str(models{i}.NumComponents)]), xlabel('PC1'), ylabel('PC2');
end

看起来就是这样:注意轮廓线的切割

【问题讨论】:

标签: matlab machine-learning data-visualization matlab-figure mixture-model


【解决方案1】:

即使使用 ezcontour,我也无法构建您的问题,但将其替换为 fcontour 可能会完成这项工作:

【讨论】:

    猜你喜欢
    • 2015-08-17
    • 1970-01-01
    • 1970-01-01
    • 2022-10-05
    • 2017-02-09
    • 2012-12-25
    • 1970-01-01
    • 1970-01-01
    • 2021-02-01
    相关资源
    最近更新 更多