本文整理汇总了Python中matplotlib.patches.PathPatch.draw方法的典型用法代码示例。如果您正苦于以下问题:Python PathPatch.draw方法的具体用法?Python PathPatch.draw怎么用?Python PathPatch.draw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.patches.PathPatch
的用法示例。
在下文中一共展示了PathPatch.draw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _draw
# 需要导入模块: from matplotlib.patches import PathPatch [as 别名]
# 或者: from matplotlib.patches.PathPatch import draw [as 别名]
def _draw(self, renderer, bboxes, ticklabels_bbox):
renderer.open_group('coordinate_axis')
self._update_ticks(renderer)
self.ticks.draw(renderer)
self.ticklabels.draw(renderer, bboxes=bboxes,
ticklabels_bbox=ticklabels_bbox)
if self.grid_lines_kwargs['visible']:
if self._grid_type == 'lines':
self._update_grid_lines()
else:
self._update_grid_contour()
if self._grid_type == 'lines':
frame_patch = self.frame.patch
for path in self.grid_lines:
p = PathPatch(path, **self.grid_lines_kwargs)
p.set_clip_path(frame_patch)
p.draw(renderer)
elif self._grid is not None:
for line in self._grid.collections:
line.set(**self.grid_lines_kwargs)
line.draw(renderer)
renderer.close_group('coordinate_axis')
示例2: _draw
# 需要导入模块: from matplotlib.patches import PathPatch [as 别名]
# 或者: from matplotlib.patches.PathPatch import draw [as 别名]
def _draw(self, renderer, bboxes):
renderer.open_group('coordinate_axis')
self._update_ticks(renderer)
self._update_grid()
self.ticks.draw(renderer)
self.ticklabels.draw(renderer, bboxes=bboxes)
if self.grid_lines_kwargs['visible']:
for path in self.grid_lines:
p = PathPatch(path, **self.grid_lines_kwargs)
p.set_clip_path(self.frame.path, Affine2D())
p.draw(renderer)
renderer.close_group('coordinate_axis')