matplotlib绘图实例演示标记路径
2018-01-23 11:56
721 查看
标记路径
演示效果:
实例代码
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 circle with an internal cutout of the star verts = 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绘图实例演示标记路径的全部内容,希望对大家有所帮助。感兴趣的朋友可以继续参阅本站其他相关专题,如有不足之处,欢迎留言指出。感谢朋友们对本站的支持!
您可能感兴趣的文章:
相关文章推荐
- matplotlib绘图实例:pyplot、pylab模块及作图参数
- 机器学习储备(9):matplotlib绘图原理及实例
- 演示如何实现Matplotlib绘图并保存图像但不显示图形的方法
- 演示如何实现Matplotlib绘图并保存图像但不显示图形的方法
- python+matplotlib演示电偶极子实例代码
- matplotlib绘图实例
- python的绘图工具matplotlib使用实例
- matplotlib绘图实例:pyplot、pylab模块及作图参数
- matplotlib绘图实例 pyplot、pylab模块及作图参数
- python的绘图工具matplotlib使用实例
- 机器学习储备(9):matplotlib绘图原理及实例
- matplotlib绘图实例
- matplotlib绘图实例:pyplot、pylab模块及作图参数
- python matplotlib绘图,修改坐标轴刻度为文字的实例
- matplotlib绘图实例:pyplot、pylab模块及作图参数
- 利用matplotlib+numpy绘制多种绘图的方法实例
- matplotlib绘图实例:pyplot、pylab模块及作图参
- matplotlib绘图实例:pyplot、pylab模块及作图参数
- python+matplotlib实现动态绘制图片实例代码(交互式绘图)
- matplotlib绘图实例:pyplot、pylab模块及作图参数