matplotlib绘图实例演示标记路径
作者:mengwei 时间:2021-10-18 08:51:04
标记路径
演示效果:
实例代码
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()
来源:https://matplotlib.org/index.html
标签:matplotlib,标记
0
投稿
猜你喜欢
仿DW的图形菜单 DIV+CSS
2007-08-14 10:07:00
python argparse的使用步骤(全网最全)
2023-06-14 01:13:45
在MySQL中使用更新日志文件
2009-02-26 16:22:00
asp中获取当前页面的地址与参数的函数代码
2011-02-20 10:37:00
SQL Server密码管理的六个危险判断
2008-10-23 13:57:00
JavaScript实现带自动提示的文本框效果代码
2011-02-05 11:13:00
在Python程序中进行文件读取和写入操作的教程
2023-05-22 10:31:56
在SUSE10环境下安装和配置MySQL数据库
2008-12-17 15:03:00
Oracle 的入门心得 强烈推荐
2009-05-24 19:55:00
python中文编码与json中文输出问题详解
2021-03-15 17:57:18
Python编程中NotImplementedError的使用方法
2023-06-08 15:40:40
asp如何获知文件最后的修改日期和时间?
2009-11-24 20:49:00
asp如何判断一个电子信箱格式是否有效?
2010-01-12 20:18:00
isset和empty的区别
2023-11-20 12:24:08
PHP PDOStatement::columnCount讲解
2023-06-04 22:24:39
Python数据库反向生成Model最优方案示例
2023-11-02 18:37:36
从外到内提高SQL Server数据库性能
2009-01-22 14:12:00
如何创建SQL Server 2000故障转移群集
2009-02-13 17:18:00
Oracle SQL中实现indexOf和lastIndexOf功能的思路及代码
2023-07-14 10:26:52
网站制作流程及界面交互设计
2007-10-26 12:00:00