Problem with pylab.fill

Hi everybody,

I would like to build an application where many filled polygons will have to be displayed on the screen. To do so, I would like to use matplotlib but, up to now, my application is not fast enough.

I use:
python 2.4.1
matplot-0.87.6
numpy-1.0rc1

and I checked my matplotlibrc file, the interactive flag is False.

Here is a little script that illustrates my problem. It takes something like 5-10s to display 80 polygons on the screen using a brand new machine.

···

###########################################

import pylab

x = range(0,810,10)
pylab.axis(‘off’)
for i in range(0,len(x)-1):
pylab.fill([x[i],x[i+1],x[i+1],x[i]],[10,10,20,20])
pylab.axis((0,810,0,610))

########################################

would you have any idea of what is going on or of a better way to implement this ?

Thank you very much

Eric


D�couvrez une nouvelle fa�on d’obtenir des r�ponses � toutes vos questions ! Profitez des connaissances, des opinions et des exp�riences des internautes sur Yahoo! Questions/R�ponses.