Files
notes_estom/Python/matplotlab/gallery/userdemo/anchored_box01.md
2020-09-26 22:03:11 +08:00

657 B

锚定Box01

锚定Box01示例

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()

下载这个示例