I'm having a problem with the bbox keyword to the text() function.  The 
code below, for me, results in one postscript file that looks fine, but 
the PNG file has letters outside of the bounding box for most of the 
words I plot.

I'm using matplotlib '0.98pre' on Mac OS X.

import matplotlib
matplotlib.use('agg')
from pylab import *

x = array([6,7,8,9,10])
y = array([6,7,8,9,10])
fig = figure()
plot(x,y,'rx')
hold('on')
fontdict2 = {'fontweight':'light',
             'color': 'k',
             'fontsize':9}
words = ['Hi','Goodbye','What''s this','Aloha','So long, farewell']
for i in range(0,len(x)):
    tx = x[i]
    ty = y[i]
    word = words[i]
    text(tx,ty,word,fontdict2,bbox={'facecolor':'w'})

savefig('textplot.eps')
savefig('textplot.png')
close(fig)

-- 
------------------------------------------------------
Michael Hearne
[EMAIL PROTECTED]
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
------------------------------------------------------


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to