本文整理汇总了Python中matplotlib.patches.CirclePolygon方法的典型用法代码示例。如果您正苦于以下问题:Python patches.CirclePolygon方法的具体用法?Python patches.CirclePolygon怎么用?Python patches.CirclePolygon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.patches
的用法示例。
在下文中一共展示了patches.CirclePolygon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_alpha
# 需要导入模块: from matplotlib import patches [as 别名]
# 或者: from matplotlib.patches import CirclePolygon [as 别名]
def test_alpha():
# We want an image which has a background color and an
# alpha of 0.4.
fig = plt.figure(figsize=[2, 1])
fig.set_facecolor((0, 1, 0.4))
fig.patch.set_alpha(0.4)
import matplotlib.patches as mpatches
fig.patches.append(mpatches.CirclePolygon([20, 20],
radius=15,
alpha=0.6,
facecolor='red'))
示例2: addCircle
# 需要导入模块: from matplotlib import patches [as 别名]
# 或者: from matplotlib.patches import CirclePolygon [as 别名]
def addCircle(self, label, x, y, r, color='y', lw=1):
"""Add circle patch at postion (*x*,*y*) with radius *r*
using a line with color *color* and thickness *lw*."""
circ=CirclePolygon((x,y),radius=r,ec=color,zorder=self.zorder,lw=lw,fill=False)
# Add patch to figure
self.addPatch(label,circ)