Python matplotlib.patches.CirclePolygon() Examples

The following are 5 code examples of matplotlib.patches.CirclePolygon(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module matplotlib.patches , or try the search function .
Example #1
Source File: test_figure.py    From neural-network-animation with MIT License 5 votes vote down vote up
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')) 
Example #2
Source File: test_figure.py    From python3_ios with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
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')) 
Example #3
Source File: guitools.py    From specidentify with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
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) 
Example #4
Source File: test_figure.py    From coffeegrindsize with MIT License 5 votes vote down vote up
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')) 
Example #5
Source File: test_figure.py    From twitter-stock-recommendation with MIT License 5 votes vote down vote up
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'))