.. _pylab_examples-marker_path:

pylab_examples example code: marker_path.py
===========================================



.. plot:: /media/TOSHI/temp/numpy_scipy_matplotlib/matplotlib/matplotlib-1.1.1~rc2/doc/mpl_examples/pylab_examples/marker_path.py

::

    import matplotlib.pyplot as plt
    import matplotlib.path as mpath
    import numpy as np
    
    
    star = mpath.Path.unit_regular_star(6)
    circle = mpath.Path.unit_circle()
    # concatenate the star with an internal cutout of the circle
    verts = np.concatenate([star.vertices, circle.vertices[::-1, ...]])
    codes = np.concatenate([star.codes, circle.codes])
    cut_star = mpath.Path(verts, codes)
    
    
    plt.plot(np.arange(10)**2, '--r', marker=cut_star, markersize=15)
    
    plt.show()
    

Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)