File: watermark_image.py

package info (click to toggle)
ipe-tools 20150406-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 532 kB
  • ctags: 618
  • sloc: cpp: 2,021; python: 1,525; ansic: 1,053; makefile: 72; sh: 11
file content (18 lines) | stat: -rw-r--r-- 413 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""
Use a Text as a watermark
"""

import numpy as np
import matplotlib.pyplot as plt

mpl.rcParams['ipe.preamble'] = r"\usepackage{times}"

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

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