本文整理汇总了Python中matplotlib.transforms.interval_contains方法的典型用法代码示例。如果您正苦于以下问题:Python transforms.interval_contains方法的具体用法?Python transforms.interval_contains怎么用?Python transforms.interval_contains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.transforms
的用法示例。
在下文中一共展示了transforms.interval_contains方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: draw
# 需要导入模块: from matplotlib import transforms [as 别名]
# 或者: from matplotlib.transforms import interval_contains [as 别名]
def draw(self, renderer):
if not self.get_visible():
return
renderer.open_group(self.__name__)
midPoint = mtransforms.interval_contains(self.get_view_interval(),
self.get_loc())
if midPoint:
if self.gridOn:
self.gridline.draw(renderer)
if self.tick1On:
self.tick1line.draw(renderer)
if self.tick2On:
self.tick2line.draw(renderer)
if self.label1On:
self.label1.draw(renderer)
if self.label2On:
self.label2.draw(renderer)
renderer.close_group(self.__name__)
示例2: draw
# 需要导入模块: from matplotlib import transforms [as 别名]
# 或者: from matplotlib.transforms import interval_contains [as 别名]
def draw(self, renderer):
if not self.get_visible():
return
renderer.open_group(self.__name__)
lower_interval = self.axes.xaxis.lower_interval
upper_interval = self.axes.xaxis.upper_interval
if self.gridOn and transforms.interval_contains(
self.axes.xaxis.get_view_interval(), self.get_loc()):
self.gridline.draw(renderer)
if transforms.interval_contains(lower_interval, self.get_loc()):
if self.tick1On:
self.tick1line.draw(renderer)
if self.label1On:
self.label1.draw(renderer)
if transforms.interval_contains(upper_interval, self.get_loc()):
if self.tick2On:
self.tick2line.draw(renderer)
if self.label2On:
self.label2.draw(renderer)
renderer.close_group(self.__name__)
# This class exists to provide two separate sets of intervals to the tick,
# as well as create instances of the custom tick
示例3: _need_lower
# 需要导入模块: from matplotlib import transforms [as 别名]
# 或者: from matplotlib.transforms import interval_contains [as 别名]
def _need_lower(self):
return (self._has_default_loc() or
transforms.interval_contains(self.axes.lower_xlim,
self.get_loc()))
示例4: _need_upper
# 需要导入模块: from matplotlib import transforms [as 别名]
# 或者: from matplotlib.transforms import interval_contains [as 别名]
def _need_upper(self):
return (self._has_default_loc() or
transforms.interval_contains(self.axes.upper_xlim,
self.get_loc()))
示例5: gridOn
# 需要导入模块: from matplotlib import transforms [as 别名]
# 或者: from matplotlib.transforms import interval_contains [as 别名]
def gridOn(self):
return (self._gridOn and (self._has_default_loc() or
transforms.interval_contains(self.get_view_interval(),
self.get_loc())))