Matplotlib plot instance demo mark path, matplotlib mark
Mark path
Demo effect:
Instance code
Import matplotlib. pyplot as pltimport matplotlib. path as mpathimport numpy as npstar = mpath. path. unit_regular_star (6) circle = mpath. path. unit_circle () # concatenate the circle with an internal cutout of the starverts = np. concatenate ([circle. vertices, star. vertices [:-1,...]) codes = np. concatenate ([circle. codes, star. codes]) cut_star = mpath. path (verts, codes) plt. plot (np. arange (10) ** 2, '-- R', marker = cut_star, markersize = 15) plt. show ()
Summary
The above is all the content of the marked path in the matplotlib drawing example in this article. I hope it will be helpful to you. If you are interested, you can continue to refer to other related topics on this site. If you have any shortcomings, please leave a message. Thank you for your support!