Adding a Watermark to a Plot in Matplotlib

Python Coding
Aug 9, 2024

--

import matplotlib.pyplot as plt

x = range(10)
y = [i**2 for i in x]

plt.plot(x, y)

# Add watermark
plt.text(0.5, 0.5, ‘clcoding’, alpha=0.3, fontsize=50, rotation=45,
ha=’center’, va=’center’, transform=plt.gca().transAxes)

plt.show()

#clcoding.com

--

--

Python Coding
Python Coding

Written by Python Coding

Learn python tips and tricks with code I Share your knowledge with us to help society. Python Quiz: https://www.clcoding.com/p/quiz-questions.html

No responses yet