concept_inspector.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:ConceptualSpaces 作者: lbechberger 项目源码 文件源码
def _draw_concept(concept, color, epsilons):
    """Paints a single concept into all four plots."""

    # plot cuboids separately in 3d
    for cuboid in concept:
        x, y, z = _cuboid_data_3d(cuboid[0], cuboid[1])
        this._ax_3d.plot_surface(x, y, z, color=color, rstride=1, cstride=1, alpha=this._alpha_3d)

    # plot overall cores in 2d
    for i in range(3):
        d1, d2 = this._current_2d_indices[i]
        core_path = _path_for_core(concept, d1, d2)
        core_patch = patches.PathPatch(core_path, facecolor=color, lw=2, alpha=this._alpha_2d)
        this._ax_2d[i].add_patch(core_patch)

        alpha_path = _path_for_core_alpha_cut(concept, d1, d2, epsilons[d1], epsilons[d2])
        alpha_patch = patches.PathPatch(alpha_path, facecolor='none', edgecolor=color, linestyle='dashed')
        this._ax_2d[i].add_patch(alpha_patch)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号