当前位置: 首页>>代码示例>>Python>>正文


Python GraphicPrimitive._plot3d_options方法代码示例

本文整理汇总了Python中sage.plot.primitive.GraphicPrimitive._plot3d_options方法的典型用法代码示例。如果您正苦于以下问题:Python GraphicPrimitive._plot3d_options方法的具体用法?Python GraphicPrimitive._plot3d_options怎么用?Python GraphicPrimitive._plot3d_options使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sage.plot.primitive.GraphicPrimitive的用法示例。


在下文中一共展示了GraphicPrimitive._plot3d_options方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _plot3d_options

# 需要导入模块: from sage.plot.primitive import GraphicPrimitive [as 别名]
# 或者: from sage.plot.primitive.GraphicPrimitive import _plot3d_options [as 别名]
    def _plot3d_options(self, options=None):
        """
        Translate 2D plot options into 3D plot options.

        EXAMPLES::

            sage: P = arrow((0,1), (2,3), width=5)
            sage: p=P[0]; p
            Arrow from (0.0,1.0) to (2.0,3.0)
            sage: q=p.plot3d()
            sage: q.thickness
            5
        """
        if options is None:
            options = self.options()
        options = dict(self.options())
        options_3d = {}
        if "width" in options:
            options_3d["thickness"] = options["width"]
            del options["width"]
        # ignore zorder and head in 3d plotting
        if "zorder" in options:
            del options["zorder"]
        if "head" in options:
            del options["head"]
        if "linestyle" in options:
            del options["linestyle"]
        options_3d.update(GraphicPrimitive._plot3d_options(self, options))
        return options_3d
开发者ID:nvcleemp,项目名称:sage,代码行数:31,代码来源:arrow.py

示例2: _plot3d_options

# 需要导入模块: from sage.plot.primitive import GraphicPrimitive [as 别名]
# 或者: from sage.plot.primitive.GraphicPrimitive import _plot3d_options [as 别名]
    def _plot3d_options(self, options=None):
        """
        Translate 2D plot options into 3D plot options. 

        EXAMPLES::

            sage: P = arrow((0,1), (2,3), width=5)
            sage: p=P[0]; p
            Arrow from (0.0,1.0) to (2.0,3.0)
            sage: q=p.plot3d()
            sage: q.thickness
            5
        """
        if options == None:
            options = self.options()
        options = dict(self.options())
        options_3d = {}
        if 'width' in options:
            options_3d['thickness'] = options['width']
            del options['width']
        # ignore zorder and head in 3d plotting
        if 'zorder' in options:
            del options['zorder']
        if 'head' in options:
            del options['head']
        if 'linestyle' in options:
            del options['linestyle']
        options_3d.update(GraphicPrimitive._plot3d_options(self, options))
        return options_3d
开发者ID:pombredanne,项目名称:sage-1,代码行数:31,代码来源:arrow.py

示例3: _plot3d_options

# 需要导入模块: from sage.plot.primitive import GraphicPrimitive [as 别名]
# 或者: from sage.plot.primitive.GraphicPrimitive import _plot3d_options [as 别名]
    def _plot3d_options(self, options=None):
        """
        Translate 2D plot options into 3D plot options.

        EXAMPLES::

            sage: T = text("ABC",(1,1))
            sage: t = T[0]
            sage: t.options()['rgbcolor']
            (0.0, 0.0, 1.0)
            sage: s=t.plot3d()
            sage: s.jmol_repr(s.testing_render_params())[0][1]
            'color atom  [0,0,255]'

        """
        if options is None:
            options = dict(self.options())
        options_3d = {}
        # TODO: figure out how to implement rather than ignore
        for s in ['axis_coords', 'clip', 'fontsize', 'horizontal_alignment',
                  'rotation', 'vertical_alignment']:
            if s in options:
                del options[s]
        options_3d.update(GraphicPrimitive._plot3d_options(self, options))
        return options_3d
开发者ID:drupel,项目名称:sage,代码行数:27,代码来源:text.py


注:本文中的sage.plot.primitive.GraphicPrimitive._plot3d_options方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。