[Matplotlib-users] Where is the widgets ...???

2010-07-11 Thread Ademir Francisco da Silva

 Hi all ...,

Anyone may tell me what happend with the /widgets/  in the matplotlib???

Before it is here ...,  from matplotlib import widgets

but now it is vanished ..., or where it is ???

Further informations ...
my matplotlib version is 1.0.0 - $Revision: 8503 $
my numpy version is 1.5.0.dev8469
my OS is Windows Vista 64

Thank you very much for any help.

Cheers,


--
Ademir Francisco da Silva

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Where is the widgets ...???

2010-07-11 Thread Ademir Francisco da Silva

 Em 11/07/2010 12:22, Ademir Francisco da Silva escreveu:

Hi all ...,

Anyone may tell me what happend with the /widgets/  in the matplotlib???

Before it is here ...,  from matplotlib import widgets

but now it is vanished ..., or where it is ???

Further informations ...
my matplotlib version is 1.0.0 - $Revision: 8503 $
my numpy version is 1.5.0.dev8469
my OS is Windows Vista 64

Thank you very much for any help.

Cheers,


--
Ademir Francisco da Silva

Hello again ...,

Case closed. Finally I find it..., but for my success I have taken off 
the  #  of the  #interactive  : False  on the line #37 from this file  
matplotlib\\mpl-data\\matplotlibrc  and everything works fine now.


But I have another important question for all of you..., recently I have 
changed my Python's version from 2.6.5 to 2.7 and since I did it my  
widgets.Cursor and widgets.Button do not work, so anyone have a idea 
about this behavior to tell me, please ???


Further information ...
My code is the same and before it works fine but now it just not works 
..., just take a look in the excerpt of my code below ...


widgets.Cursor( axe, useblit = True, color = self.cor[ 477 ][ 1 ], lw = 2 )
widgets.Button( pyplot.axes( [ .91, .1, .08, .06 ] ), self.textName[ 19 ],
color = self.cor[ 403 ][ 1 ], hovercolor = 
self.cor[ 46 ][ 1 ] ).\

on_clicked( self.button_12Click )

How may I fix it, please ???


Cheers,


--
Ademir Francisco da Silva

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Where is the widgets ...???

2010-07-11 Thread Ademir Francisco da Silva

 Em 11/07/2010 13:56, John Hunter escreveu:

On Sun, Jul 11, 2010 at 11:15 AM, Ademir Francisco da Silva

Case closed. Finally I find it..., but for my success I have taken off the
#  of the  #interactive  : False  on the line #37 from this file
matplotlib\\mpl-data\\matplotlibrc  and everything works fine now.

I don't think this flag will affect whether or nor widgets is
imported.  Are you sure you haven't made some other changes?


But I have another important question for all of you..., recently I have
changed my Python's version from 2.6.5 to 2.7 and since I did it my
widgets.Cursor and widgets.Button do not work, so anyone have a idea about
this behavior to tell me, please ???

Further information ...
My code is the same and before it works fine but now it just not works ...,
just take a look in the excerpt of my code below ...

widgets.Cursor( axe, useblit = True, color = self.cor[ 477 ][ 1 ], lw = 2 )
widgets.Button( pyplot.axes( [ .91, .1, .08, .06 ] ), self.textName[ 19 ],
 color = self.cor[ 403 ][ 1 ], hovercolor = self.cor[
46 ][ 1 ] ).\
 on_clicked( self.button_12Click )

How may I fix it, please ???

Did you compile matplotlib for python2.7 yourself -- we haven't
released any binaries yet for that version.  Can you paste a complete
free-standing example that replicates the problem as wee as the output
of your script on your system when you pass in the --verbose-helpful
flag?

JDH



Hi John ...,

I am just take that binarie from this internet address
http://www.lfd.uci.edu/~gohlke/pythonlibs/
H..., so I was wondering that the problem is it and I will have to 
wait for the official version of the matplotlib binaries for the Python 
2.7( win64 ). Sucks...!
I hope to have that binaries asap and after the installation of it I 
will verify if that problem continues.


anyway I really enjoyed your prompt aid ..., Thanks.


Cheers,


--
Ademir Francisco da Silva

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] How can I solve this ... ???

2010-07-03 Thread Ademir Francisco da Silva

 Hello all,

I really need a help to solve this problem below ..., so let's go ...

I have a Python script( plus Tkinter, Pmw and PmwContribD, matplotlib ) 
with more than 5.000 lines and when I have included a matplot Button 
code ( look excerpt of may code below ) appears this error message after 
I use /on_clicked( self.button_12Click )/  to quit of that figure and 
ask to Tkinter run it again ...


Error: 1
class '_tkinter.TclError' Exception in Tk callback
  Function: function callit at 0x073B2C88 (type: type 
'function')

  Args: ()
Traceback (innermost last):
  File C:\Python26\lib\site-packages\Pmw\Pmw_1_3\lib\PmwBase.py, line 
1747, in __call__

return apply(self.func, args)
  File C:\Python26\lib\lib-tk\Tkinter.py, line 495, in callit
func(*args)
  File 
C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py, 
line 273, in idle_draw

self.draw()
  File 
C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py, 
line 259, in draw

tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
  File C:\Python26\lib\site-packages\matplotlib\backends\tkagg.py, 
line 19, in blit
tk.call(PyAggImagePhoto, photoimage, id(aggimage), colormode, 
id(bbox_array))

class '_tkinter.TclError': this isn't a Tk application

Apparently the problem is in /tkagg.py module/ , so how can I solved 
this ???


Excerpt of my code .:

def graphic_1( self ):
fig = pyplot.figure( figsize = ( 7.5, 4.5 ), dpi = 100 )
Several code here 
widgets.Button( pyplot.axes( [ .91, .1, .08, .06 ] ), 
self.textName[ 19 ],
color = self.cor[ 403 ][ 1 ], 
hovercolor = self.cor[ 46 ][ 1 ] ).\

on_clicked( self.button_12Click )
Several code here 
pyplot.show()

def button_12Click( self, e = None ):pyplot.close( all )

I have tried to use this /self.Master.update_idletasks()/  with no 
sucess. Please aid me to find a solution.



Thank you very much.



--
Ademir Francisco da Silva

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] How can I solve this ... ??? II

2010-07-03 Thread Ademir Francisco da Silva

 Hello all,

I have another problem to solve but I guess be easier than my first 
message for this list ..., so let's go again ...,


I have this error message as follow ...

Exception in Tkinter callback
Traceback (most recent call last):
  File C:\Python26\lib\lib-tk\Tkinter.py, line 1410, in __call__
return self.func(*args)
  File C:\Users\Ademir\Documents\Ademir\Python\Modulos\Lottery.py, 
line 1361, in table_2Rel
if askyesno( self.textName[ 21 ], self.textName[ 22 ] ):   
self.graphic_2()
  File C:\Users\Ademir\Documents\Ademir\Python\Modulos\Lottery.py, 
line 1469, in graphic_2

else:   pyplot.draw()
  File C:\Python26\lib\site-packages\matplotlib\pyplot.py, line 349, 
in draw

get_current_fig_manager().canvas.draw()
  File 
C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py, 
line 258, in draw

FigureCanvasAgg.draw(self)
  File 
C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py, line 
394, in draw

self.figure.draw(self.renderer)
  File C:\Python26\lib\site-packages\matplotlib\artist.py, line 55, 
in draw_wrapper

draw(artist, renderer, *args, **kwargs)
  File C:\Python26\lib\site-packages\matplotlib\figure.py, line 802, 
in draw

func(*args)
  File C:\Python26\lib\site-packages\matplotlib\artist.py, line 55, 
in draw_wrapper

draw(artist, renderer, *args, **kwargs)
  File C:\Python26\lib\site-packages\matplotlib\text.py, line 524, in 
draw

bbox, info = self._get_layout(renderer)
  File C:\Python26\lib\site-packages\matplotlib\text.py, line 303, in 
_get_layout

clean_line, ismath = self.is_math_text(line)
  File C:\Python26\lib\site-packages\matplotlib\text.py, line 978, in 
is_math_text

if cbook.is_math_text(s):
  File C:\Python26\lib\site-packages\matplotlib\cbook.py, line 1682, 
in is_math_text

s = unicode(s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 5: 
ordinal not in range(128)


excerpt of may code is ...

fig.suptitle( LotoFácil, fontsize = self.fon[ 6 ][ 1 ], fontweight = 
extra bold,
  fontstyle = italic, color = self.cor[ 608 ][ 1 
], lod = True )


The problem is /LotoFácil/  . I solve it just using LotoFacil instead 
but I'm Brazilian and this is not correct for us. Help me please.



Thank you very much,


--
Ademir Francisco da Silva

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How can I solve this ... ??? II

2010-07-03 Thread Ademir Francisco da Silva

 Ryan ...,

Very good ..., it works perfectly ...

It's so easy but I didn't remember to use it ...

In fact my problem is slightly more complicated than this because I have 
used  textName[ 2 ]  instead of literal  LotoFácil  as I told you ( I 
know I didn't say this before, my fault ), the correct code is ...


fig.suptitle( textName[ 2 ], fontsize = self.fon[ 6 ][ 1 ], fontweight = 
extra bold,
  fontstyle = italic, color = self.cor[ 608 ][ 1 
], lod = True )


however, after your mention about /unicode string/ you gave me a good 
idea so I solved my problem this way ...


fig.suptitle( unicode( self.textName[ 2 ], cp1252 ), fontsize = 
self.fon[ 6 ][ 1 ], fontweight = extra bold,
  fontstyle = italic, color = self.cor[ 608 ][ 1 
], lod = True )


and everything works perfectly again.

But I was thinking that the correct way is to fix it there in cbook.py, 
anyway ...


File C:\Python26\lib\site-packages\matplotlib\cbook.py, line 1682, in 
is_math_text

s = unicode(s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 5: 
ordinal not in range(128)



Thank you very much for your prompt aid,



Ademir Francisco da Silva


Em 03/07/2010 19:05, Ryan May escreveu:

On Sat, Jul 3, 2010 at 4:12 PM, Ademir Francisco da Silva
ademirfs_...@itelefonica.com.br  wrote:

excerpt of may code is ...
fig.suptitle( LotoFácil, fontsize = self.fon[ 6 ][ 1 ], fontweight = extra 
bold,
   fontstyle = italic, color = self.cor[ 608 ][ 1 ], lod 
= True )

but I'm Brazilian and this is not correct for us. Help me please.

Try using a python unicode string instead:

fig.suptitle( uLotoFácil, fontsize = self.fon[ 6 ][ 1 ], fontweight
= extra bold,
fontstyle = italic, color = self.cor[ 608 ][
1 ], lod = True )

That works for me here (though with the original, I just get missing
characters, not an error).

Ryan




--
Ademir Francisco da Silva

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users