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

annotate_simple02

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

注释Simple02

注释Simple02示例

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


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

ax.annotate("Test",
xy=(0.2, 0.2), xycoords='data',
xytext=(0.8, 0.8), textcoords='data',
size=20, va="center", ha="center",
arrowprops=dict(arrowstyle="simple",
connectionstyle="arc3,rad=-0.2"),
)

plt.show()

下载这个示例

  • 下载python源码: annotate_simple02.py
  • 下载Jupyter notebook: annotate_simple02.ipynb
文章作者: Estom
文章链接: https://estom.github.io/2020/09/26/Python/matplotlab/gallery/userdemo/annotate_simple02/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Estom的博客!
cover of previous post
上一篇
annotate_simple03
注释Simple03 12345678910111213141516import matplotlib.pyplot as pltfig, ax = plt.subplots(figsize=(3, 3))ann = ax.annotate("Test", xy=(0.2, 0.2), xycoords='data', xytext=(0.8, 0.8), textcoords='data', size=20, va="center", ha="center", bbox=dict(boxstyle="round4", fc="w"), arrowprops=dict(arrowstyle="-|>", ...
cover of next 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...
avatar
Estom
也许那年在绿色的麦浪中奔跑的时候,就注定了我此生的繁华与悲叹
文章
2976
标签
100
分类
63
关注
公告
欢迎参观Estom的小屋
目录
  1. 1. 注释Simple02
    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
搜索
数据加载中