matplotlib Annotation标注
来源:互联网 发布:iphone字体软件 编辑:程序博客网 时间:2024/06/04 19:19
import matplotlib.pyplot as pltimport numpy as npx = np.linspace(-3, 3, 50)y = 2*x + 1plt.figure(num=1, figsize=(8,5),)plt.plot(x, y,)ax = plt.gca()ax.spines['right'].set_color('none')ax.spines['top'].set_color('none')ax.xaxis.set_ticks_position('bottom')ax.spines['bottom'].set_position(('data', 0))ax.yaxis.set_ticks_position('left')ax.spines['left'].set_position(('data', 0))x0 = 1y0 = 2*x0 + 1plt.scatter(x0, y0, s=50, color='b')plt.plot([x0, x0], [y0,0], 'k--', lw=2.5)# method 1plt.annotate( r'$2x+1=%s$' % y0, xy=(x0, y0), xycoords='data', xytext=(+30, -30), textcoords='offset points', fontsize=16, arrowprops=dict(arrowstyle='->', connectionstyle='arc3, rad=.2'))# method 2plt.text( -3.7, 3, r'$This\ is\ the\ some\ text.\ \mu\ \sigma_i\ \alpha_t$', fontdict={'size':16, 'color':'r'})plt.show()
阅读全文
0 0
- matplotlib Annotation标注
- matplotlib模块数据可视化-Annotation标注
- 【Matplotlib】 标注一些点
- 【Matplotlib】 标注细节注意
- 【JAVA】 标注(Annotation)
- Annotation 标注(注解)
- Matplotlib 中文用户指南 4.5 标注
- Java 标注(Annotation)详解
- JUnit中标注Annotation介绍
- Java 标注(Annotation)详解 .
- Java 标注(Annotation)详解
- Java 标注(Annotation)详解
- Java 标注(Annotation)详解
- Java 标注(Annotation)详解
- matplotlib学习之图例,标注,透明度
- 利用 annotation 命令实现图形的标注
- Image Annotation Result 图像标注结果
- 图像自动标注 Automatic image annotation
- 初识文本处理工具
- 算法系列——Longest Increasing Subsequence
- jvm之内存调优
- 关于select设置动态值(自定义)为选中项
- 【Linux】Linux中常用操作命令
- matplotlib Annotation标注
- 回归-简述
- Listener监听器
- 人生感悟随笔
- resful API
- 数据库语言(DDL和DML)
- Codeforces 580A
- 使用iObjects java进行多进程生成缓存
- UI 自动化高亮元素与截图小工具