Version 3.1.2
matplotlib

Table of Contents

Related Topics

Text watermark

Adding a text watermark.

==============
Text watermark
==============

Adding a text watermark.
"""
import numpy as np
import matplotlib.pyplot as plt

# Fixing random state for reproducibility
np.random.seed(19680801)


fig, ax = plt.subplots()
ax.plot(np.random.rand(20), '-o', ms=20, lw=2, alpha=0.7, mfc='orange')
ax.grid()

fig.text(0.95, 0.05, 'Property of MPL',
         fontsize=50, color='gray',
         ha='right', va='bottom', alpha=0.5)

plt.show()
Traceback (most recent call last):
  File "/build/matplotlib-mO9dyQ/matplotlib-3.1.2/examples/text_labels_and_annotations/watermark_text.py", line 1
    ==============
    ^
SyntaxError: invalid syntax

References

The use of the following functions, methods, classes and modules is shown in this example:

import matplotlib
matplotlib.figure.Figure.text

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