本文整理汇总了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
示例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
示例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