Version 3.0.2
matplotlib

Related Topics

Anchored Box01ΒΆ

Traceback (most recent call last):
  File "/build/matplotlib-xz4j8t/matplotlib-3.1.2/examples/userdemo/anchored_box01.py", line 1
    ==============
    ^
SyntaxError: invalid syntax
==============
Anchored 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()

Keywords: matplotlib code example, codex, python plot, pyplot Gallery generated by Sphinx-Gallery