AlphaBetaTest / cing

Automatically exported from code.google.com/p/cing
0 stars 0 forks source link

Matplotlib using tkagg backend crashing on snow leopard #268

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Follow the mac installation guide for cing on snow leopard 10.6.4 using 
tkagg backend specified in:
~/.matplotlib/matplotlibrc. No problem with Linux.

What is the expected output? What do you see instead?
jd:Stella/~/ ipython -pylab
Python 2.6.6 (r266:84292, Nov 12 2010, 10:24:05) 
Type "copyright", "credits" or "license" for more information.

IPython 0.10.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

  Welcome to pylab, a matplotlib-based Python environment.
  For more information, type 'help(pylab)'.

In [1]: plot([1,2,3])
Exception in Tkinter callback
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py", line 1410, in __call__
    return self.func(*args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py", line 248, in resize
    self.show()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py", line 252, in draw
    tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/tkagg.py", line 19, in blit
    tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode, id(bbox_array))
TclError
Out[1]: [<matplotlib.lines.Line2D object at 0x1051c4e50>]

In [2]: alloc: invalid block: 0x104ace9e0: ff ff
Abort

I will now have to try with another backend. GTKAgg seems to be the new default 
from:
http://matplotlib.sourceforge.net/users/customizing.html

Original issue reported on code.google.com by jurge...@gmail.com on 12 Nov 2010 at 9:42

GoogleCodeExporter commented 9 years ago
Fixed by choosing the proper variants with port see doc in comments to:
MacInstallationGuide

Original comment by jurge...@gmail.com on 12 Nov 2010 at 10:32

GoogleCodeExporter commented 9 years ago
Something like: 

port update py26-matplotlib +tkinter +gtk2

tkinter allows the use of tkAgg backend

Original comment by jurge...@gmail.com on 12 Nov 2010 at 10:34