mirror of
https://github.com/Estom/notes.git
synced 2026-04-26 03:20:55 +08:00
matplotlib & pandas
This commit is contained in:
23
Python/matplotlab/gallery/userdemo/anchored_box01.md
Normal file
23
Python/matplotlab/gallery/userdemo/anchored_box01.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# 锚定Box01
|
||||
|
||||

|
||||
|
||||
```python
|
||||
import matplotlib.pyplot as plt
|
||||
from matplotlib.offsetbox import AnchoredText
|
||||
|
||||
|
||||
fig, ax = plt.subplots(figsize=(3, 3))
|
||||
|
||||
at = AnchoredText("Figure 1a",
|
||||
prop=dict(size=15), frameon=True, loc='upper left')
|
||||
at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2")
|
||||
ax.add_artist(at)
|
||||
|
||||
plt.show()
|
||||
```
|
||||
|
||||
## 下载这个示例
|
||||
|
||||
- [下载python源码: anchored_box01.py](https://matplotlib.org/_downloads/anchored_box01.py)
|
||||
- [下载Jupyter notebook: anchored_box01.ipynb](https://matplotlib.org/_downloads/anchored_box01.ipynb)
|
||||
Reference in New Issue
Block a user