[Matplotlib-users] Different between canvas.draw() and canvas.restore_region()??

2008-04-20 Thread hjc520070
canvas.draw() is slow in animation, I have succeed in replacing it with canvas.restore_region(). And it is wonderful. However, in the following, I fail to make it work the same as canvas.draw().The following code can work. And creat a dynamic line. When I work with the statement

Re: [Matplotlib-users] Different between canvas.draw() and canvas.restore_region()??

2008-04-20 Thread hjc520070
Thanks for your help. I get it work. However, an interesting thing appears. The following two codes(code 1 and code 2) makes different result??? Only set background in different place. Anyone can tell me why? I am eager to know it. ##code 1 import wx from matplotlib.backends.backend_wxagg import

[Matplotlib-users] AssertionError On ax.draw_artist() ????

2008-04-19 Thread hjc520070
I work matplotlib on wxpython, python2.5. It is wonderful that the following code work faster than canvas.draw(). canvas.restore_region(background) ##Updata three lines and draw it. line.set_data(x,y) ax.draw_artist(line)

Re: [Matplotlib-users] formatter on colorbar ???

2008-04-19 Thread hjc520070
Thanks for Eric Firing's reply to me.The solution is: colorbar(im, extend='both', shrink=0.8,format='%0.1f%%',ticks=locator) The double % in the format string makes it print a single %, and when given a format string, the format kwarg automatically hands it off to a FormatStrFormatter. --

[Matplotlib-users] How to draw series of dots on axes??

2008-04-17 Thread hjc520070
We can use ax.broken_barh to draw rectangles. But I can't find any fuctions to draw dots on axeCan anyone help me? -- View this message in context: http://www.nabble.com/How-to-draw-series-of-dots-on-axes---tp16744026p16744026.html Sent from the matplotlib - users mailing list archive at

[Matplotlib-users] formatter on colorbar ???

2008-04-12 Thread hjc520070
I just want to set [10%,20%] on colorbar. However, failed again and again. Thank you for your help. The following code work properly. But when I set formatter = FixedFormatter([10%,20%,30%,40%]) No labels is shown on colorbar, Why? Is there any way to set the char % on colorbar? from

Re: [Matplotlib-users] speeding up imshow

2008-04-12 Thread hjc520070
I just use blit on imshow map, and work properly. Maybe the following code will help you. def ontimer() canvas.restore_region(background) im.set_array(Z) ax.draw_artist(self.imList[i]) canvas.blit(ax.bbox) canvas.gui_repaint() -- View this message in context:

[Matplotlib-users] How to show matplotlib.image ?

2007-12-05 Thread hjc520070
The following run well . But I just want to make the image, with the x and y as axis and z as the image value ,show on the figure. In the pylab , we can just give a command imshow ,But here , I fail to do it , I have try ax.imshow() again and again ,but fail. Can sb give me some advice . Thank

Re: [Matplotlib-users] matplotlib/__init__.py : gs version parsing problem

2007-12-05 Thread hjc520070
Xavier Gnata wrote: Hi, Quoting matplotlib/__init__.py : def checkdep_ghostscript(): try: if sys.platform == 'win32': command = 'gswin32c -v' else: command = 'gs -v' stdin, stdout = os.popen4(command) line =