標記路徑
演示效果:

實例代碼
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()
總結
以上就是本文關于matplotlib繪圖實例演示標記路徑的全部內容,希望對大家有所幫助。感興趣的朋友可以繼續參閱本站其他相關專題,如有不足之處,歡迎留言指出。感謝朋友們對本站的支持!
新聞熱點
疑難解答