matplotlib TransformWrapper

Posted code_explorer

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了matplotlib TransformWrapper相关的知识,希望对你有一定的参考价值。

2020-04-09 23:26:53 --Edit by yangray

TransformWrapper 是Transform的子类, 支持在运行中替掉一个变换(可以是不同类型, 但维度必须相同)

方法:

  • __init__(child):

    参数 [child]: Transform实例(变换)    

    以child初始化为本变换。(child可能在之后被替换掉)

  • _init(child):

    参数同上

    以child初始化本变换(由__init__()调用)

  • frozen():

    返回本变换的静态拷贝。

  • _set(child):

    参数[child]: Transform实例(变换)    

    用child替换掉本变换。(由_init(), set()调用)

  • set(child):

    参数同上

    用child替换掉本变换,并做错误检查、无效化祖先等操作。

  • _get_is_affine(), _get_is_separable(), _get_has_inverse():

     返回当前使用的变换(child)是否 是仿射变换 /是否可分离 /是否有自己的反转方法。

以上是关于matplotlib TransformWrapper的主要内容,如果未能解决你的问题,请参考以下文章

Matplotlib 基本概念

Matplotlib快速入门

matplotlib绘图入门详解

matplotlib 绘图常用函数

Matplotlib 教程

安装matplotlib?