|
From: <jd...@us...> - 2008-06-24 19:15:22
|
Revision: 5670
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5670&view=rev
Author: jdh2358
Date: 2008-06-24 12:15:20 -0700 (Tue, 24 Jun 2008)
Log Message:
-----------
use plain text rather than text image for watermark example
Modified Paths:
--------------
trunk/matplotlib/doc/devel/release_guide.rst
trunk/matplotlib/examples/api/watermark_text.py
Modified: trunk/matplotlib/doc/devel/release_guide.rst
===================================================================
--- trunk/matplotlib/doc/devel/release_guide.rst 2008-06-24 18:58:41 UTC (rev 5669)
+++ trunk/matplotlib/doc/devel/release_guide.rst 2008-06-24 19:15:20 UTC (rev 5670)
@@ -55,10 +55,17 @@
* ftp the source and binaries to the anonymous FTP site::
- local> cd dist
- local> ncftp upload.sourceforge.net
- ncftp> cd incoming
- ncftp> put tar.gz, zip exe
+ mpl> svn-clean
+ mpl> python setup.py sdist
+ mpl> cd dist/
+ dist> sftp jd...@fr...
+ Connecting to frs.sourceforge.net...
+ sftp> cd uploads
+ sftp> ls
+ sftp> lls
+ matplotlib-0.98.2.tar.gz
+ sftp> put matplotlib-0.98.2.tar.gz
+ Uploading matplotlib-0.98.2.tar.gz to /incoming/j/jd/jdh2358/uploads/matplotlib-0.98.2.tar.gz
* go https://sourceforge.net/project/admin/?group_id=80706 and do a
file release. Click on the "Admin" tab to log in as an admin, and
Modified: trunk/matplotlib/examples/api/watermark_text.py
===================================================================
--- trunk/matplotlib/examples/api/watermark_text.py 2008-06-24 18:58:41 UTC (rev 5669)
+++ trunk/matplotlib/examples/api/watermark_text.py 2008-06-24 19:15:20 UTC (rev 5670)
@@ -1,34 +1,22 @@
"""
-Use a PNG file as a watermark
+Use a Text as a watermark
"""
import numpy as np
import matplotlib
matplotlib.use('Agg')
-import matplotlib.mathtext as mathtext
import matplotlib.pyplot as plt
-import matplotlib
-matplotlib.rc('image', origin='upper')
-dpi = 100 # save dpi
-w, h = 8, 6 # inches
+fig = plt.figure()
-parser = mathtext.MathTextParser("Bitmap")
-
-rgba, depth1 = parser.to_rgba(r'Property of MPL', color='gray',
- fontsize=30, dpi=200)
-rgba[:,:,-1] *= 0.5
-fig = plt.figure(figsize=(w,h))
-
ax = fig.add_subplot(111)
ax.plot(np.random.rand(20), '-o', ms=20, lw=2, alpha=0.7, mfc='orange')
ax.grid()
-imh, imw, tmp = rgba.shape
+# position bottom right
+fig.text(0.95, 0.05, 'Property of MPL',
+ fontsize=50, color='gray',
+ ha='right', va='bottom', alpha=0.5)
-# position image at bottom right
-fig.figimage(rgba.astype(float)/255., w*dpi-imw, 0)
+fig.savefig('watermarked_text', transparent=True)
-
-fig.savefig('watermarked_text', transparent=True, dpi=dpi)
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|