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


Python PlotStyle.isEnabled方法代码示例

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


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

示例1: test_plot_style_builtin_checks

# 需要导入模块: from ert_gui.plottery import PlotStyle [as 别名]
# 或者: from ert_gui.plottery.PlotStyle import isEnabled [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())
开发者ID:pgdr,项目名称:ert,代码行数:31,代码来源:test_plot_style.py

示例2: test_plot_style_test_defaults

# 需要导入模块: from ert_gui.plottery import PlotStyle [as 别名]
# 或者: from ert_gui.plottery.PlotStyle import isEnabled [as 别名]
    def test_plot_style_test_defaults(self):
        style = PlotStyle("Test")

        self.assertEqual(style.name, "Test")
        self.assertEqual(style.color, "#000000")
        self.assertEqual(style.line_style, "-")
        self.assertEqual(style.alpha, 1.0)
        self.assertEqual(style.marker, "")
        self.assertEqual(style.width, 1.0)
        self.assertTrue(style.isEnabled())
开发者ID:akva2,项目名称:ert,代码行数:12,代码来源:test_plot_style.py

示例3: test_plot_style_copy_style

# 需要导入模块: from ert_gui.plottery import PlotStyle [as 别名]
# 或者: from ert_gui.plottery.PlotStyle import isEnabled [as 别名]
    def test_plot_style_copy_style(self):
        style = PlotStyle("Test", "red", 0.5, ".", "o", 2.5)
        style.setEnabled(False)

        copy_style = PlotStyle("Copy")

        copy_style.copyStyleFrom(style)

        self.assertNotEqual(style.name, copy_style.name)
        self.assertEqual(style.color, copy_style.color)
        self.assertEqual(style.alpha, copy_style.alpha)
        self.assertEqual(style.line_style, copy_style.line_style)
        self.assertEqual(style.marker, copy_style.marker)
        self.assertEqual(style.width, copy_style.width)
        self.assertNotEqual(style.isEnabled(), copy_style.isEnabled())

        another_copy_style = PlotStyle("Another Copy")
        another_copy_style.copyStyleFrom(style, copy_enabled_state=True)
        self.assertEqual(style.isEnabled(), another_copy_style.isEnabled())
开发者ID:akva2,项目名称:ert,代码行数:21,代码来源:test_plot_style.py

示例4: PlotConfig

# 需要导入模块: from ert_gui.plottery import PlotStyle [as 别名]
# 或者: from ert_gui.plottery.PlotStyle import isEnabled [as 别名]

#.........这里部分代码省略.........
        style = PlotStyle("Distribution Style")
        style.copyStyleFrom(self.__distribution_style)
        style.color = self.currentColor()
        return style

    def distributionLineStyle(self):
        """ @rtype: ert_gui.plottery.PlotStyle """
        style = PlotStyle("Distribution Line Style")
        style.copyStyleFrom(self.__distribution_line_style)
        return style

    def xLabel(self):
        return self.__x_label

    def yLabel(self):
        return self.__y_label

    def legendItems(self):
        return self.__legend_items

    def legendLabels(self):
        return self.__legend_labels

    def setXLabel(self, label):
        self.__x_label = label

    def setYLabel(self, label):
        self.__y_label = label

    def setObservationsEnabled(self, enabled):
        self.__observation_style.setEnabled(enabled)

    def isObservationsEnabled(self):
        return self.__observation_style.isEnabled()

    def setRefcaseEnabled(self, enabled):
        self.__refcase_style.setEnabled(enabled)

    def isRefcaseEnabled(self):
        return self.__refcase_style.isEnabled()

    def isLegendEnabled(self):
        return self.__legend_enabled

    def isDistributionLineEnabled(self):
        return self.__distribution_line_style.isEnabled()

    def setDistributionLineEnabled(self, enabled):
        self.__distribution_line_style.setEnabled(enabled)

    def setLegendEnabled(self, enabled):
        self.__legend_enabled = enabled

    def isGridEnabled(self):
        return self.__grid_enabled

    def setGridEnabled(self, enabled):
        self.__grid_enabled = enabled

    def deactivateDateSupport(self):
        self.__date_support_active = False

    def isDateSupportActive(self):
        return self.__date_support_active

    def setStatisticsStyle(self, statistic, line_style, marker):
开发者ID:akva2,项目名称:ert,代码行数:70,代码来源:plot_config.py

示例5: PlotConfig

# 需要导入模块: from ert_gui.plottery import PlotStyle [as 别名]
# 或者: from ert_gui.plottery.PlotStyle import isEnabled [as 别名]

#.........这里部分代码省略.........
        style = PlotStyle("Distribution Style")
        style.copyStyleFrom(self._distribution_style)
        style.color = self.currentColor()
        return style

    def distributionLineStyle(self):
        """ @rtype: ert_gui.plottery.PlotStyle """
        style = PlotStyle("Distribution Line Style")
        style.copyStyleFrom(self._distribution_line_style)
        return style

    def xLabel(self):
        return self._x_label

    def yLabel(self):
        return self._y_label

    def legendItems(self):
        return self._legend_items

    def legendLabels(self):
        return self._legend_labels

    def setXLabel(self, label):
        self._x_label = label

    def setYLabel(self, label):
        self._y_label = label

    def setObservationsEnabled(self, enabled):
        self._observation_style.setEnabled(enabled)

    def isObservationsEnabled(self):
        return self._observation_style.isEnabled()

    def setRefcaseEnabled(self, enabled):
        self._refcase_style.setEnabled(enabled)

    def isRefcaseEnabled(self):
        return self._refcase_style.isEnabled()

    def setHistoryEnabled(self, enabled):
        self._history_style.setEnabled(enabled)

    def isHistoryEnabled(self):
        return self._history_style.isEnabled()

    def isLegendEnabled(self):
        return self._legend_enabled

    def isDistributionLineEnabled(self):
        return self._distribution_line_style.isEnabled()

    def setDistributionLineEnabled(self, enabled):
        self._distribution_line_style.setEnabled(enabled)

    def setStandardDeviationFactor(self, value):
        self._std_dev_factor = value

    def getStandardDeviationFactor(self):
        return self._std_dev_factor

    def setLegendEnabled(self, enabled):
        self._legend_enabled = enabled

    def isGridEnabled(self):
开发者ID:arielalmendral,项目名称:ert,代码行数:70,代码来源:plot_config.py


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