avatar
文章
2976
标签
100
分类
63
首页
时间轴
标签
分类
知识库
关于
友链
LogoEstom的博客annotate_simple01 返回首页
搜索
首页
时间轴
标签
分类
知识库
关于
友链

annotate_simple01

发表于2020-09-26|更新于2020-09-26|Python
|总字数:67|阅读时长:1分钟|浏览量:

注释Simple01

注释Simple01示例

1
2
3
4
5
6
7
8
9
10
11
12
13
import matplotlib.pyplot as plt


fig, ax = plt.subplots(figsize=(3, 3))

ax.annotate("",
xy=(0.2, 0.2), xycoords='data',
xytext=(0.8, 0.8), textcoords='data',
arrowprops=dict(arrowstyle="->",
connectionstyle="arc3"),
)

plt.show()

下载这个示例

  • 下载python源码: annotate_simple01.py
  • 下载Jupyter notebook: annotate_simple01.ipynb
文章作者: Estom
文章链接: https://estom.github.io/2020/09/26/Python/matplotlab/gallery/userdemo/annotate_simple01/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Estom的博客!
cover of previous post
上一篇
anchored_box04
锚定Box04 12345678910111213141516171819202122232425262728293031323334from matplotlib.patches import Ellipseimport matplotlib.pyplot as pltfrom matplotlib.offsetbox import (AnchoredOffsetbox, DrawingArea, HPacker, TextArea)fig, ax = plt.subplots(figsize=(3, 3))box1 = TextArea(" Test : ", textprops=dict(color="k"))box2 = DrawingArea(60, 20, 0, 0)el1 = Ellipse((10, 10), width=16, height=5, angle=30, fc="r")el2 = Ellipse((30, 10), width...
cover of next post
下一篇
annotate_explain
注释说明 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576import matplotlib.pyplot as pltimport matplotlib.patches as mpatchesfig, axs = plt.subplots(2, 2)x1, y1 = 0.3, 0.3x2, y2 = 0.7, 0.7ax = axs.flat[0]ax.plot([x1, x2], [y1, y2], ".")el = mpatches.Ellipse((x1, y1), 0.3, 0.4, angle=30, alpha=0.2)ax.add_artist(el)ax.annotate("", xy=(x1, y1), xycoords='data', ...
avatar
Estom
也许那年在绿色的麦浪中奔跑的时候,就注定了我此生的繁华与悲叹
文章
2976
标签
100
分类
63
关注
公告
欢迎参观Estom的小屋
目录
  1. 1. 注释Simple01
    1. 1.1. 下载这个示例
最新文章
自引用泛型概述
自引用泛型概述2025-12-21
02 集合底层结构
02 集合底层结构2025-12-18
11 Arrays和Collections
11 Arrays和Collections2025-12-18
06 JUC并发容器
06 JUC并发容器2025-12-18
30 问题排查和性能优化指南
30 问题排查和性能优化指南2025-09-14
© 2025 - 2026 By Estom框架 Hexo 8.1.1|主题 Butterfly 5.5.3
搜索
数据加载中