Hi!
I'm using matplotlib and I'm writing a viewer for multiple sequence
alignments (read: large matrices of uppercase characters). It's coming
along nicely and matplotlib is a real charm to work with. Unfortunately,
I may have run into a showstopper. I've tried all tricks I can think of,
I've searched bugs and mail archives and googled, but to no avail. The
text labels just don't render quickly enough for comfortable browsing.
The attached script test.py illustrates my problem. Run it, and then
resize the plot window to trigger a redraw and you'll see what I mean.
The rendering is really slow.
I've also attached the output from "python test.py --verbose-helpful".
Is there any way I can make this draw quicker? Am I doing this in a bad
way? If so, what would be a good way?
Cheers!
/Joel
matplotlib data path /usr/lib/python2.4/site-packages/matplotlib/mpl-data
$HOME=/home/bioinfo/yohell
CONFIGDIR=/home/bioinfo/yohell/.matplotlib
loaded rc file /home/bioinfo/yohell/.matplotlib/matplotlibrc
matplotlib version 0.87.7
verbose.level helpful
interactive is False
platform is linux2
numerix numpy 1.0
font search path ['/usr/lib/python2.4/site-packages/matplotlib/mpl-data']
loaded ttfcache file /home/bioinfo/yohell/.matplotlib/ttffont.cache
backend GTKAgg version 2.8.6
import random
import pylab
aas = "ACDEFGHIKLMNPQRSTVWXY-"
fig = pylab.figure()
xmax = 100
ymax = 50
for iX in range(xmax):
for iY in range(ymax):
pylab.text(iX + 0.5,
iY + 0.5,
random.choice(aas),
family = 'sans-serif',
size = 6,
horizontalalignment = 'center',
verticalalignment = 'center')
pylab.xlim(0, xmax)
pylab.ylim(0, ymax)
pylab.show()
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users