本文整理汇总了Python中ert_gui.plottery.PlotStyle.color方法的典型用法代码示例。如果您正苦于以下问题:Python PlotStyle.color方法的具体用法?Python PlotStyle.color怎么用?Python PlotStyle.color使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ert_gui.plottery.PlotStyle
的用法示例。
在下文中一共展示了PlotStyle.color方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_plot_style_builtin_checks
# 需要导入模块: from ert_gui.plottery import PlotStyle [as 别名]
# 或者: from ert_gui.plottery.PlotStyle import color [as 别名]
def test_plot_style_builtin_checks(self):
style = PlotStyle("Test")
style.name = None
self.assertIsNone(style.name)
style.color = "notacolor"
self.assertEqual(style.color, "notacolor") # maybe make this a proper check in future ?
style.line_style = None
self.assertEqual(style.line_style, "")
style.marker = None
self.assertEqual(style.marker, "")
style.width = -1
self.assertEqual(style.width, 0.0)
style.size = -1
self.assertEqual(style.size, 0.0)
style.alpha = 1.1
self.assertEqual(style.alpha, 1.0)
style.alpha = -0.1
self.assertEqual(style.alpha, 0.0)
style.setEnabled(False)
self.assertFalse(style.isEnabled())
示例2: distributionStyle
# 需要导入模块: from ert_gui.plottery import PlotStyle [as 别名]
# 或者: from ert_gui.plottery.PlotStyle import color [as 别名]
def distributionStyle(self):
""" @rtype: PlotStyle """
style = PlotStyle("Distribution Style")
style.copyStyleFrom(self.__distribution_style)
style.color = self.currentColor()
return style
示例3: defaultStyle
# 需要导入模块: from ert_gui.plottery import PlotStyle [as 别名]
# 或者: from ert_gui.plottery.PlotStyle import color [as 别名]
def defaultStyle(self):
style = PlotStyle("Default Style")
style.copyStyleFrom(self.__default_style)
style.color = self.currentColor()
return style
示例4: histogramStyle
# 需要导入模块: from ert_gui.plottery import PlotStyle [as 别名]
# 或者: from ert_gui.plottery.PlotStyle import color [as 别名]
def histogramStyle(self):
""" @rtype: PlotStyle """
style = PlotStyle("Histogram Style")
style.copyStyleFrom(self.__histogram_style)
style.color = self.currentColor()
return style
示例5: getStatisticsStyle
# 需要导入模块: from ert_gui.plottery import PlotStyle [as 别名]
# 或者: from ert_gui.plottery.PlotStyle import color [as 别名]
def getStatisticsStyle(self, statistic):
style = self.__statistics_style[statistic]
copy_style = PlotStyle(style.name)
copy_style.copyStyleFrom(style)
copy_style.color = self.currentColor()
return copy_style